aboutsummaryrefslogtreecommitdiff
path: root/gdb/symmisc.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-04-18 06:52:33 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-04-18 06:52:33 +0000
commit12df843f84c7dadade469db58e279390f16d11f1 (patch)
treed89ad616e07da31661478d7b2d917420eb157075 /gdb/symmisc.c
parentefd4ebc3413121e4cde5b0355fdde0e1dbb76b93 (diff)
downloadgdb-12df843f84c7dadade469db58e279390f16d11f1.zip
gdb-12df843f84c7dadade469db58e279390f16d11f1.tar.gz
gdb-12df843f84c7dadade469db58e279390f16d11f1.tar.bz2
gdb/
Fix 64-bit constants on 32-bit hosts. * dwarf2read.c (read_unsigned_leb128): Change declaration return type from unsigned long to ULONGEST. (read_signed_leb128): Change declaration return type from long to LONGEST. (dwarf2_const_value_attr): Change declaration parameter value from long to LONGEST. (dwarf2_compute_name): Change variable value from long to LONGEST. (read_unsigned_leb128): Change return type, variable result and some casts from unsigned long to ULONGEST. (read_signed_leb128): Change return type, variable result and some casts from long to LONGEST. (dwarf2_const_value_data, dwarf2_const_value_attr): Change parameter value from long to LONGEST. (dwarf2_const_value): Change variable value from long to LONGEST. * symmisc.c (print_symbol): Change SYMBOL_VALUE format strings to use plongest and hex_string. * symtab.h (struct general_symbol_info): Change ivalue from long to LONGEST, remove the comment. * tracepoint.c (validate_actionline, collect_symbol, scope_info): Change SYMBOL_VALUE format strings to use plongest and hex_string.
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r--gdb/symmisc.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index daa0b43..b0ab29b 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -509,9 +509,9 @@ print_symbol (void *args)
switch (SYMBOL_CLASS (symbol))
{
case LOC_CONST:
- fprintf_filtered (outfile, "const %ld (0x%lx)",
- SYMBOL_VALUE (symbol),
- SYMBOL_VALUE (symbol));
+ fprintf_filtered (outfile, "const %s (%s)",
+ plongest (SYMBOL_VALUE (symbol)),
+ hex_string (SYMBOL_VALUE (symbol)));
break;
case LOC_CONST_BYTES:
@@ -539,28 +539,31 @@ print_symbol (void *args)
case LOC_REGISTER:
if (SYMBOL_IS_ARGUMENT (symbol))
- fprintf_filtered (outfile, "parameter register %ld",
- SYMBOL_VALUE (symbol));
+ fprintf_filtered (outfile, "parameter register %s",
+ plongest (SYMBOL_VALUE (symbol)));
else
- fprintf_filtered (outfile, "register %ld", SYMBOL_VALUE (symbol));
+ fprintf_filtered (outfile, "register %s",
+ plongest (SYMBOL_VALUE (symbol)));
break;
case LOC_ARG:
- fprintf_filtered (outfile, "arg at offset 0x%lx",
- SYMBOL_VALUE (symbol));
+ fprintf_filtered (outfile, "arg at offset %s",
+ hex_string (SYMBOL_VALUE (symbol)));
break;
case LOC_REF_ARG:
- fprintf_filtered (outfile, "reference arg at 0x%lx", SYMBOL_VALUE (symbol));
+ fprintf_filtered (outfile, "reference arg at %s",
+ hex_string (SYMBOL_VALUE (symbol)));
break;
case LOC_REGPARM_ADDR:
- fprintf_filtered (outfile, "address parameter register %ld", SYMBOL_VALUE (symbol));
+ fprintf_filtered (outfile, "address parameter register %s",
+ plongest (SYMBOL_VALUE (symbol)));
break;
case LOC_LOCAL:
- fprintf_filtered (outfile, "local at offset 0x%lx",
- SYMBOL_VALUE (symbol));
+ fprintf_filtered (outfile, "local at offset %s",
+ hex_string (SYMBOL_VALUE (symbol)));
break;
case LOC_TYPEDEF: