From ae822768f95e54d76823eff769e87bb438fdf4d3 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sun, 22 Jun 2003 18:32:49 +0000 Subject: [PATCH] * symfile.c (add_symbol_file_command): Use parse_and_eval_address. Suggested by Nick Hibma . --- gdb/ChangeLog | 5 +++++ gdb/symfile.c | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fafb938690a..c6dc51d82a6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-06-22 Daniel Jacobowitz + + * symfile.c (add_symbol_file_command): Use parse_and_eval_address. + Suggested by Nick Hibma . + 2003-06-22 Andrew Cagney * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Handle diff --git a/gdb/symfile.c b/gdb/symfile.c index 6eee61a4a92..3b7ebc26a7b 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1807,11 +1807,7 @@ add_symbol_file_command (char *args, int from_tty) char *val = sect_opts[i].value; char *sec = sect_opts[i].name; - val = sect_opts[i].value; - if (val[0] == '0' && val[1] == 'x') - addr = strtoul (val+2, NULL, 16); - else - addr = strtoul (val, NULL, 10); + addr = parse_and_eval_address (val); /* Here we store the section offsets in the order they were entered on the command line. */ -- 2.30.2