This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [patch v4 1/3] Create remove-symbol-file command.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]