aboutsummaryrefslogtreecommitdiff
path: root/gdb/minsyms.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-04-13 15:25:23 +0000
committerDaniel Jacobowitz <drow@false.org>2003-04-13 15:25:23 +0000
commit6aca59a35914f39148f06d4d43f56a56c3cc4e55 (patch)
treed327e6c146a153e962e85f8b637bbbb1a9de20ae /gdb/minsyms.c
parent97095916d8797df284d695578c1ba41a578ba822 (diff)
downloadgdb-6aca59a35914f39148f06d4d43f56a56c3cc4e55.zip
gdb-6aca59a35914f39148f06d4d43f56a56c3cc4e55.tar.gz
gdb-6aca59a35914f39148f06d4d43f56a56c3cc4e55.tar.bz2
* minsyms.c (install_minimal_symbols): Only switch to gnu-v3 mode
if the linkage name demangled successfully.
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r--gdb/minsyms.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index d8569ff..1f6cb38 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -920,8 +920,14 @@ install_minimal_symbols (struct objfile *objfile)
for (i = 0; i < mcount; i++)
{
+ /* If a symbol's name starts with _Z and was successfully
+ demangled, then we can assume we've found a GNU v3 symbol.
+ For now we set the C++ ABI globally; if the user is
+ mixing ABIs then the user will need to "set cp-abi"
+ manually. */
const char *name = SYMBOL_LINKAGE_NAME (&objfile->msymbols[i]);
- if (name[0] == '_' && name[1] == 'Z')
+ if (name[0] == '_' && name[1] == 'Z'
+ && SYMBOL_DEMANGLED_NAME (&objfile->msymbols[i]) != NULL)
{
set_cp_abi_as_auto_default ("gnu-v3");
break;