This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
String argument within a gdb command file
- From: First Last <nvk4444 at yahoo dot com>
- To: gdb at sourceware dot org
- Date: Tue, 10 Jan 2012 22:57:01 -0800 (PST)
- Subject: String argument within a gdb command file
Hi,
?
I am trying to use add-symbol-file with arguments within a gdb command file.
add-symbol-file $filename $load_addr
I found that the $filename is not evaluated
?
(gdb) add-symbol-file $filename $load_addr
add symbol table from file "$filename" at
??????? .text_addr = 0x800000
(y or n)
but print $filename works.
(gdb) print $filename
$1 = 0xabcd5678 "correct-obj-file.o"
(gdb) print $load_addr
$2 = (void*) 0x800000
I tried
shell awk '{printf "add-symbol-file $arg0 $arg1\n"}'
?
but, it did not help.
?
Any suggestions?
?
Thanks,
NK
?