summaryrefslogtreecommitdiff
path: root/gdb/symmisc.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-04-18 06:52:25 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-04-18 06:52:25 +0000
commit1e20d6a28a174d91cfb851925764e1947acaf052 (patch)
treed782ed5c412653330a73768766c34417debfdb5d /gdb/symmisc.c
parent253b0509388a097b446d818ead7b528d46a99886 (diff)
downloadgdb-1e20d6a28a174d91cfb851925764e1947acaf052.tar.gz
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 daa0b43e193..b0ab29b6c7d 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: