This is the mail archive of the 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: FW: [PATCH v11 0/5] remove-symbol-file & add-symbol-file

This looks like a nice feature to be included. Unfortunately i do not have a say on its approval.


On 07/02/2013 05:04 AM, Blanc, Nicolas wrote:

I would appreciate if you could you have a look at this patch

Feedback from Luis and Eli was positive, and I am not aware of any concern
left from other reviewers.

Patch 1/5 contains the implementation of the remove-symbol-file command:

remove-symbol-file FILE
remove-symbol-file -a ADDR

Remove a symbol file added via the add-symbol-file command. The file to
remove can be identified by its filename or by an address that lies within the
boundaries of this symbol file in memory.

GDB has no command for displaying user-added object files. In particular,
'info files' does not list user-added sections. This issue is addressed in Patch 4/5.

Thank you,


Changes between v10 and v11:

* Changed documentation for add-symbol-file according to feedback (Patch 3):
   "keeps adding to" -> "is kept in addition to".

* Fixed indentation issues in test (sym-file-main.c from Patch 2).

Changes between v9 and v10:

* Dropped "USAGE" in "USAGE: remove-symbol-file FILENAME" according to suggestion.

* Fixed comment according to suggestion:
   "any reference to any objfile" -> "all references to any objfile"

* Added argument names to the prototype of is_addr_in_objfile according to suggestion.

* Fixed indentation of "macro" loops according to feedback.

* Fixed indentation issues.

Changes between v8 and v9:

* Patch 4: New patch (fix  add-symbol-file for 'info files').
* Patch 5: New patch (test add-symbol-file and 'info files');

* sym-file.exp: Fixed test name string.

Changes between v7 and v8:

* sym-file.exp: Call gdb_get_line_number with ${libfile}.c intead of $libsrc.

* Fixed typo in commit message for Patch 2/3.

Changes between v6 and v7:

* Changed disable_breakpoints_in_freed_objfile () from feedback:
   Use is_breakpoint () and is_tracepoint ().
   Add call to mark_breakpoint_location_modified ().

* Changed command description according to suggestion.

* Changed commit log message for new functions according to feedback.

* Fixed nits in gdb/solib.c and testsuite/gdb.base/sym-file.exp.

Changes between v5 and v6:

* Changed syntax of the command according to feedback:
     remove-symbol-file FILENAME
     remove-symbol-file -a ADDRESS

* Updated the documentation for the new syntax.

* Updated the test for the new syntax.

* Added check to only remove objfiles from the current program space.

Changes between v4 and v5:

* The address parameter can now be any address mapping into one of the sections
   of the file to remove. This is more flexible and more judicious because the symbol
   file may have no text section, as pointed out in some reviews.

* Move is_addr_in_objfile from breakpoint.c to objfiles.c. This new function
   is now used in both symfile.c and breakpoint.c.

* is_addr_in_objfile returns now 0 if OBJFILE is NULL.

* Updated the documentation to reflect the command change.

* Removed double blank lines.

* Reworded the log entries in the commit messages, as suggested.

* The test was simplified using prepare_for_testing, as suggested.

Changes between v3 and v4:

* gdb/symfile.c: add missing space character in output string.

* gdb/doc/gdb.texinfo: add usage example.

Changes between v2 and v3:

* gdb/breakpoints.c (disable_breakpoints_in_freed_objfile):
   Changed name of disable_breakpoints_in_free_objfile to disable_breakpoints_in_freed_objfile.
   Call observer_breakpoint_modified at most one time per breakpoint.

* gdb/objfiles.h (struct objfile): Add comment for low_addr.

* gdb/solib.c (remove_user_added_objfile): Don't check OBJF_SHARED anymore to avoid leaving dangling pointers.

* gdb/symfile.c (add_symbol_file_command): Parse and evaluate the address parameter only once.

* gdb/symfile.c (remove_symbol_file_command): Don't use gdb_buildargv anymore. Ask the user for confirmation before removing a file.

* gdb/doc/gdb.texinfo: The parameter of the command is now referred to as "the address of the text section".

* gdb/NEWS: Move the entry for remove-symbol-file to "Changes since GDB 7.6". The address parameter is now referred to as "the beginning of the text section".

* Fixed letter case of variables in comments.

* Fixed indentation typos.

Nicolas Blanc (5):
   New remove-symbol-file command.
   Test adding and removing a symbol file at runtime.
   Documentation for the remove-symbol-file command.
   'add-symbol-file' should update the current target sections.
   Test 'info files' after 'add-symbol-file' and 'remove-symbol-file'.

  gdb/NEWS                               |    6 +
  gdb/breakpoint.c                       |   67 ++++++-
  gdb/doc/gdb.texinfo                    |   26 ++-
  gdb/doc/observer.texi                  |    4 +
  gdb/objfiles.c                         |   23 ++
  gdb/objfiles.h                         |    2 +
  gdb/printcmd.c                         |   15 +-
  gdb/solib.c                            |   22 ++
  gdb/symfile.c                          |  151 +++++++++++++-
  gdb/testsuite/gdb.base/sym-file-lib.c  |   26 +++
  gdb/testsuite/gdb.base/sym-file-main.c |  374 ++++++++++++++++++++++++++++++++
  gdb/testsuite/gdb.base/sym-file.exp    |  155 +++++++++++++
  12 files changed, 858 insertions(+), 13 deletions(-)  create mode 100644 gdb/testsuite/gdb.base/sym-file-lib.c
  create mode 100644 gdb/testsuite/gdb.base/sym-file-main.c
  create mode 100644 gdb/testsuite/gdb.base/sym-file.exp

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]