Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: gdb/nacl-tdep.c

Issue 12380017: Recognize NaCl OS ABI for all ELF files. (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: comment formatting Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/nacl-tdep.c
diff --git a/gdb/nacl-tdep.c b/gdb/nacl-tdep.c
index fe485b13b35f67c8461824bf90d8bea93a12dacd..da118e471eed20618ce9abfbd06d1045f91ffc68 100644
--- a/gdb/nacl-tdep.c
+++ b/gdb/nacl-tdep.c
@@ -36,10 +36,18 @@
static enum gdb_osabi
nacl_osabi_sniffer (bfd *abfd)
{
- /* WARNING! This way of checking for NaCl OS ABI is deprecated.
- See http://code.google.com/p/nativeclient/issues/detail?id=2971 */
- if (bfd_get_flavour (abfd) == bfd_target_elf_flavour &&
- elf_elfheader (abfd)->e_ident[EI_OSABI] == 123)
+ /* We removed Linux remote debugging support from NaCl debugger, so we must
+ handle all ELF files ourselves now.
+
+ If we want to support both Linux and NaCl remote debugging simultaneously,
+ we would have to find some way to distinguish NaCl and Linux binaries here.
+ Currently there is no way to distinguish PNaCl-produced binaries from
+ Linux binaries.
+
+ See issues https://code.google.com/p/nativeclient/issues/detail?id=2971 and
+ https://code.google.com/p/nativeclient/issues/detail?id=3313
+ for details. */
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
return GDB_OSABI_NACL;
return GDB_OSABI_UNKNOWN;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698