This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [patch v4 1/3] Create remove-symbol-file command.
- From: "Blanc, Nicolas" <nicolas dot blanc at intel dot com>
- To: "lgustavo at codesourcery dot com" <lgustavo at codesourcery dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, "palves at redhat dot com" <palves at redhat dot com>, "tromey at redhat dot com" <tromey at redhat dot com>, "eliz at gnu dot org" <eliz at gnu dot org>, "yao at codesourcery dot com" <yao at codesourcery dot com>
- Date: Wed, 29 May 2013 12:08:19 +0000
- Subject: RE: [patch v4 1/3] Create remove-symbol-file command.
- References: <1369818805-14288-1-git-send-email-nicolas dot blanc at intel dot com> <1369818805-14288-2-git-send-email-nicolas dot blanc at intel dot com> <51A5CC72 dot 2090000 at codesourcery dot com>
Hi Luis,
Thanks for your feedback. I'll fix the nits.
> I'm thinking, with a command called "remove-symbol-file" i would expect to provide some kind of filename to this command. Should the user also be able to state a DSO name here and have it unloaded?
> Maybe have the name translated to the base address used to unload the library internally?
The first address parameter of the add-symbol-file command is a better way to identify the file to remove than the file name because a file can be loaded multiple times at different addresses -- this case is important for me. The user knows the "start address" very well since he typed it in for adding the file. So I see no real benefit of adding a file-name parameter.
This is what I wrote in the documentation:
remove-symbol-file address
The remove-symbol-file command removes all symbol information about the
file loaded at address. address must be an expression that represents the address
of the text section of a file added by the user via the add-symbol-file
command. In other words, the file to remove is identified by the first address
parameter of the add-symbol-file command:
(gdb) add-symbol-file /home/user/gdb/mylib.so 0x7ffff7ff9480
add symbol table from file "/home/user/gdb/mylib.so" at
.text_addr = 0x7ffff7ff9480
(y or n) y
Reading symbols from /home/user/gdb/mylib.so...done.
(gdb) remove-symbol-file 0x7ffff7ff9480
Remove symbol table from file "/home/user/gdb/mylib.so" at\
.text_addr = 0x7ffff7ff9480
(y or n) y
(gdb)
remove-symbol-file does not repeat if you press RET after using it.
Keeping the current syntax would be ok with you?
Regards,
Nicolas
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052