This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Fix osabi botch
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Wed, 22 Nov 2006 12:35:41 -0500
- Subject: [commit] Fix osabi botch
The previous gdbarch initialization code satisfied
GDB_OSABI_UNINITIALIZED from the previous gdbarch; this eventually
turned all GDB_OSABI_UNINITIALIZED return values into
GDB_OSABI_UNKNOWN, but only because of the static initializer for the
dummy gdbarch in gdbarch.c. I missed that :-( So right now GDB
prints a nasty warning when you start up an arm-eabi GDB, or anything
else that doesn't set a default OSABI.
Fixed as below, and on the branch too. Sorry for any inconvenience.
--
Daniel Jacobowitz
CodeSourcery
2006-11-22 Daniel Jacobowitz <dan@codesourcery.com>
* osabi.c (gdbarch_lookup_osabi): Do not return
GDB_OSABI_UNINITIALIZED.
Index: gdb/osabi.c
===================================================================
RCS file: /cvs/src/src/gdb/osabi.c,v
retrieving revision 1.37
diff -u -p -r1.37 osabi.c
--- gdb/osabi.c 10 Feb 2006 20:56:14 -0000 1.37
+++ gdb/osabi.c 22 Nov 2006 17:30:51 -0000
@@ -207,14 +207,9 @@ gdbarch_lookup_osabi (bfd *abfd)
return user_selected_osabi;
/* If we don't have a binary, return the default OS ABI (if set) or
- an inconclusive result (otherwise). */
+ unknown (otherwise). */
if (abfd == NULL)
- {
- if (GDB_OSABI_DEFAULT != GDB_OSABI_UNKNOWN)
- return GDB_OSABI_DEFAULT;
- else
- return GDB_OSABI_UNINITIALIZED;
- }
+ return GDB_OSABI_DEFAULT;
match = GDB_OSABI_UNKNOWN;
match_specific = 0;