Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Blanc, Nicolas" <nicolas.blanc@intel.com>
To: "lgustavo@codesourcery.com" <lgustavo@codesourcery.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	"palves@redhat.com" <palves@redhat.com>,
	"tromey@redhat.com"	<tromey@redhat.com>,
	"eliz@gnu.org" <eliz@gnu.org>,
	"yao@codesourcery.com"	<yao@codesourcery.com>
Subject: RE: [patch v4 1/3] Create remove-symbol-file command.
Date: Wed, 29 May 2013 12:08:00 -0000	[thread overview]
Message-ID: <388084C8C1E6A64FA36AD1D656E485661A799D20@IRSMSX106.ger.corp.intel.com> (raw)
In-Reply-To: <51A5CC72.2090000@codesourcery.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


  reply	other threads:[~2013-05-29 12:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29  9:13 [patch v4 0/3] remove-symbol-file Nicolas Blanc
2013-05-29  9:13 ` [patch v4 1/3] Create remove-symbol-file command Nicolas Blanc
2013-05-29  9:38   ` Luis Machado
2013-05-29 12:08     ` Blanc, Nicolas [this message]
2013-05-29 12:11       ` Luis Machado
2013-05-29  9:13 ` [patch v4 2/3] Test adding and removing a symbol file at runtime Nicolas Blanc
2013-05-29  9:48   ` Luis Machado
2013-05-29  9:13 ` [patch v4 3/3] Documentation for the remove-symbol-file command Nicolas Blanc
2013-05-29 15:59   ` Eli Zaretskii
2013-05-29 17:11     ` Blanc, Nicolas
2013-05-29 17:25       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=388084C8C1E6A64FA36AD1D656E485661A799D20@IRSMSX106.ger.corp.intel.com \
    --to=nicolas.blanc@intel.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=lgustavo@codesourcery.com \
    --cc=palves@redhat.com \
    --cc=tromey@redhat.com \
    --cc=yao@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox