summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <mcgrathr@chromium.org>2015-05-29 09:37:11 -0700
committerRoland McGrath <mcgrathr@chromium.org>2015-05-29 09:37:11 -0700
commit0e608b2496529278fcd6a4c01b75dcba9b53d152 (patch)
treec4d2b1a0fcbd766870ba47867275a15c95909097
parentc8f6c93cb29febd6b8174a20eb35368e70f62faa (diff)
downloadbinutils-gdb-users/roland/osabi.tar.gz
Recognize GNU .note.ABI-tag values 5 (syllable) and 6 (nacl)users/roland/osabi
gdb/ * defs.h (enum gdb_osabi): Add GDB_OSABI_SYLLABLE and GDB_OSABI_NACL. * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Recognize GNU_ABI_TAG_SYLLABLE and GNU_ABI_TAG_NACL. * configure.tgt (*-*-nacl*): Set gdb_osabi=GDB_OSABI_NACL.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/configure.tgt1
-rw-r--r--gdb/defs.h20
-rw-r--r--gdb/osabi.c8
4 files changed, 27 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 48dbcd3c9a1..459d65f79b5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2015-05-29 Roland McGrath <mcgrathr@google.com>
+ * defs.h (enum gdb_osabi): Add GDB_OSABI_SYLLABLE and GDB_OSABI_NACL.
+ * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Recognize
+ GNU_ABI_TAG_SYLLABLE and GNU_ABI_TAG_NACL.
+ * configure.tgt (*-*-nacl*): Set gdb_osabi=GDB_OSABI_NACL.
+
+2015-05-29 Roland McGrath <mcgrathr@google.com>
+
PR gdb/18464
* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Use warning
rather than internal_error for an unrecognized value.
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 4e4d6a90684..d7f083df666 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -702,6 +702,7 @@ case "${targ}" in
gdb_osabi=GDB_OSABI_FREEBSD_ELF ;;
*-*-linux* | *-*-uclinux*)
gdb_osabi=GDB_OSABI_LINUX ;;
+*-*-nacl*) gdb_osabi=GDB_OSABI_NACL ;;
*-*-nto*) gdb_osabi=GDB_OSABI_QNXNTO ;;
m68*-*-openbsd* | m88*-*-openbsd* | vax-*-openbsd*) ;;
*-*-openbsd*) gdb_osabi=GDB_OSABI_OPENBSD_ELF ;;
diff --git a/gdb/defs.h b/gdb/defs.h
index 44702eaff9c..20d9eaf0de5 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -93,7 +93,7 @@ enum compile_i_scope_types
/* The O_BINARY flag is defined in fcntl.h on some non-Posix platforms.
It is used as an access modifier in calls to open(), where it acts
similarly to the "b" character in fopen()'s MODE argument. On Posix
- platforms it should be a no-op, so it is defined as 0 here. This
+ platforms it should be a no-op, so it is defined as 0 here. This
ensures that the symbol may be used freely elsewhere in gdb. */
#ifndef O_BINARY
@@ -303,11 +303,11 @@ extern int print_address_symbolic (struct gdbarch *, CORE_ADDR,
extern int build_address_symbolic (struct gdbarch *,
CORE_ADDR addr,
- int do_demangle,
- char **name,
- int *offset,
- char **filename,
- int *line,
+ int do_demangle,
+ char **name,
+ int *offset,
+ char **filename,
+ int *line,
int *unmapped);
extern void print_address (struct gdbarch *, CORE_ADDR, struct ui_file *);
@@ -569,6 +569,8 @@ enum gdb_osabi
GDB_OSABI_LYNXOS178,
GDB_OSABI_NEWLIB,
GDB_OSABI_SDE,
+ GDB_OSABI_SYLLABLE,
+ GDB_OSABI_NACL,
GDB_OSABI_INVALID /* keep this last */
};
@@ -651,9 +653,9 @@ extern void (*deprecated_post_add_symbol_hook) (void);
extern void (*selected_frame_level_changed_hook) (int);
extern int (*deprecated_ui_loop_hook) (int signo);
extern void (*deprecated_show_load_progress) (const char *section,
- unsigned long section_sent,
- unsigned long section_size,
- unsigned long total_sent,
+ unsigned long section_sent,
+ unsigned long section_size,
+ unsigned long total_sent,
unsigned long total_size);
extern void (*deprecated_print_frame_info_listing_hook) (struct symtab * s,
int line,
diff --git a/gdb/osabi.c b/gdb/osabi.c
index 3581eb334c4..15035843810 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -492,6 +492,14 @@ generic_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect, void *obj)
*osabi = GDB_OSABI_NETBSD_ELF;
break;
+ case GNU_ABI_TAG_SYLLABLE:
+ *osabi = GDB_OSABI_SYLLABLE;
+ break;
+
+ case GNU_ABI_TAG_NACL:
+ *osabi = GDB_OSABI_NACL;
+ break;
+
default:
warning (_("GNU ABI tag value %u unrecognized."), abi_tag);
break;