From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28961 invoked by alias); 24 Jun 2013 08:36:28 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 28895 invoked by uid 89); 24 Jun 2013 08:36:28 -0000 X-Spam-SWARE-Status: No, score=-5.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,TW_BJ,TW_RG autolearn=ham version=3.3.1 Received: from mga14.intel.com (HELO mga14.intel.com) (143.182.124.37) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 24 Jun 2013 08:36:26 +0000 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 24 Jun 2013 01:36:24 -0700 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by azsmga001.ch.intel.com with ESMTP; 24 Jun 2013 01:36:22 -0700 Received: from ulslx001.iul.intel.com (ulslx001.iul.intel.com [172.28.207.63]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id r5O8aIW9006519; Mon, 24 Jun 2013 09:36:21 +0100 Received: from ulslx001.iul.intel.com (localhost [127.0.0.1]) by ulslx001.iul.intel.com with ESMTP id r5O8aH5q028551; Mon, 24 Jun 2013 10:36:17 +0200 Received: (from nblanc@localhost) by ulslx001.iul.intel.com with id r5O8aGeX028547; Mon, 24 Jun 2013 10:36:16 +0200 From: Nicolas Blanc To: gdb-patches@sourceware.org, lgustavo@codesourcery.com Cc: nicolas.blanc@intel.com Subject: [PATCH v10 0/5] remove-symbol-file & add-symbol-file Date: Mon, 24 Jun 2013 08:36:00 -0000 Message-Id: <1372062967-28510-1-git-send-email-nicolas.blanc@intel.com> X-SW-Source: 2013-06/txt/msg00644.txt.bz2 Hi Luis, I updated the patch and changed the identation of macro loops according to your feedback. All formatting issues should be gone. Can you have a look again? Thank you, Nicolas Regressions tested with '~/gdb/configure; make -j10; make check 'RUNTESTFLAGS=""' on the following systems: *x86_64: Fedora 15 Ubuntu12.04 *x86: RedHat 6.2 Ubuntu 12.04 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