This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/260: variables not expanded on the add-symbol-file command line
- From: Nick Hibma <n_hibma at webweaving dot org>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 28 May 2002 19:28:01 -0000
- Subject: Re: gdb/260: variables not expanded on the add-symbol-file command line
- Reply-to: Nick Hibma <n_hibma at webweaving dot org>
The following reply was made to PR gdb/260; it has been noted by GNATS.
From: Nick Hibma <n_hibma@webweaving.org>
To: nobody@sources.redhat.com, phil@off.net,
gdb-gnats@sources.redhat.com, gdb-prs@sources.redhat.com
Cc:
Subject: Re: gdb/260: variables not expanded on the add-symbol-file command line
Date: Tue, 28 May 2002 21:23:53 +0200
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=260
The following patch fixes this (in 5.2) (note that it also removes a
duplicate initialisation):
# diff -wu symfile.c.orig symfile.c
--- symfile.c.orig Tue May 28 15:51:37 2002
+++ symfile.c Tue May 28 21:21:04 2002
@@ -1546,11 +1546,7 @@
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. */