diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-04-18 06:52:33 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-04-18 06:52:33 +0000 |
commit | 12df843f84c7dadade469db58e279390f16d11f1 (patch) | |
tree | d89ad616e07da31661478d7b2d917420eb157075 /gdb/tracepoint.c | |
parent | efd4ebc3413121e4cde5b0355fdde0e1dbb76b93 (diff) | |
download | gdb-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/tracepoint.c')
-rw-r--r-- | gdb/tracepoint.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 057b441..86b6cfa 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -740,10 +740,10 @@ validate_actionline (char **line, struct breakpoint *b) { if (SYMBOL_CLASS (exp->elts[2].symbol) == LOC_CONST) { - error (_("constant `%s' (value %ld) " + error (_("constant `%s' (value %s) " "will not be collected."), SYMBOL_PRINT_NAME (exp->elts[2].symbol), - SYMBOL_VALUE (exp->elts[2].symbol)); + plongest (SYMBOL_VALUE (exp->elts[2].symbol))); } else if (SYMBOL_CLASS (exp->elts[2].symbol) == LOC_OPTIMIZED_OUT) @@ -980,8 +980,8 @@ collect_symbol (struct collection_list *collect, SYMBOL_CLASS (sym)); break; case LOC_CONST: - printf_filtered ("constant %s (value %ld) will not be collected.\n", - SYMBOL_PRINT_NAME (sym), SYMBOL_VALUE (sym)); + printf_filtered ("constant %s (value %s) will not be collected.\n", + SYMBOL_PRINT_NAME (sym), plongest (SYMBOL_VALUE (sym))); break; case LOC_STATIC: offset = SYMBOL_VALUE_ADDRESS (sym); @@ -2623,8 +2623,9 @@ scope_info (char *args, int from_tty) count--; /* Don't count this one. */ continue; case LOC_CONST: - printf_filtered ("a constant with value %ld (0x%lx)", - SYMBOL_VALUE (sym), SYMBOL_VALUE (sym)); + printf_filtered ("a constant with value %s (%s)", + plongest (SYMBOL_VALUE (sym)), + hex_string (SYMBOL_VALUE (sym))); break; case LOC_CONST_BYTES: printf_filtered ("constant bytes: "); @@ -2657,16 +2658,16 @@ scope_info (char *args, int from_tty) gdbarch_register_name (gdbarch, regno)); break; case LOC_ARG: - printf_filtered ("an argument at stack/frame offset %ld", - SYMBOL_VALUE (sym)); + printf_filtered ("an argument at stack/frame offset %s", + plongest (SYMBOL_VALUE (sym))); break; case LOC_LOCAL: - printf_filtered ("a local variable at frame offset %ld", - SYMBOL_VALUE (sym)); + printf_filtered ("a local variable at frame offset %s", + plongest (SYMBOL_VALUE (sym))); break; case LOC_REF_ARG: - printf_filtered ("a reference argument at offset %ld", - SYMBOL_VALUE (sym)); + printf_filtered ("a reference argument at offset %s", + plongest (SYMBOL_VALUE (sym))); break; case LOC_REGPARM_ADDR: /* Note comment at LOC_REGISTER. */ |