* symfile.c (add_symbol_file_command): Use parse_and_eval_address.
authorDaniel Jacobowitz <drow@false.org>
Sun, 22 Jun 2003 18:32:49 +0000 (18:32 +0000)
committerDaniel Jacobowitz <drow@false.org>
Sun, 22 Jun 2003 18:32:49 +0000 (18:32 +0000)
Suggested by Nick Hibma <n_hibma@webweaving.org>.

gdb/ChangeLog
gdb/symfile.c

index fafb938690a220cb641164f1da3937c555c67fb0..c6dc51d82a64310baf6cab3ecd09f2a8eef8e0b5 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-22  Daniel Jacobowitz  <drow@mvista.com>
+
+       * symfile.c (add_symbol_file_command): Use parse_and_eval_address.
+       Suggested by Nick Hibma <n_hibma@webweaving.org>.
+
 2003-06-22  Andrew Cagney  <cagney@redhat.com>
 
        * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Handle
index 6eee61a4a92ba530282d8f0c6785a491333d325f..3b7ebc26a7b495024595a1495c09d7de6b834c10 100644 (file)
@@ -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. */