From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18312 invoked by alias); 12 Sep 2016 20:28:18 -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 18272 invoked by uid 89); 12 Sep 2016 20:28:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=Cause, defer, D*ericsson.com, H*F:D*ericsson.com X-HELO: sessmg22.ericsson.net Received: from sessmg22.ericsson.net (HELO sessmg22.ericsson.net) (193.180.251.58) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Sep 2016 20:28:07 +0000 Received: from ESESSHC011.ericsson.se (Unknown_Domain [153.88.183.51]) by (Symantec Mail Security) with SMTP id FE.BF.02458.4DF07D75; Mon, 12 Sep 2016 22:28:04 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (153.88.183.145) by oa.msg.ericsson.com (153.88.183.51) with Microsoft SMTP Server (TLS) id 14.3.301.0; Mon, 12 Sep 2016 22:28:02 +0200 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=marc-andre.laperle@ericsson.com; Received: from emalape-Latitude-E6540.dyn.mo.ca.am.ericsson.se (192.75.88.130) by HE1PR07MB1275.eurprd07.prod.outlook.com (10.164.51.149) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.609.9; Mon, 12 Sep 2016 20:28:00 +0000 From: Marc-Andre Laperle To: CC: Marc-Andre Laperle Subject: [PATCH 1/3] Remove unused parameter in solib_add and update_solib_list Date: Mon, 12 Sep 2016 20:28:00 -0000 Message-ID: <1473712054-30417-1-git-send-email-marc-andre.laperle@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: SN1PR02CA0001.namprd02.prod.outlook.com (10.165.224.139) To HE1PR07MB1275.eurprd07.prod.outlook.com (10.164.51.149) X-MS-Office365-Filtering-Correlation-Id: 369e02a6-eacc-4f84-dc8e-08d3db4b4aac X-Microsoft-Exchange-Diagnostics: 1;HE1PR07MB1275;2:v7BzFU/MHdkcM+Kp/zDBRSqz8KW+mKuU85mZVF70jRlaYvUJbuEhGbwd3MxP5QqMGkhoD94UkF5U+l9ykYhGF978Y5/EiUmXlZAOwdW+Wr2w/OO3dhHHbiE9R+5NfzOY9ts+3pOOTTKQrhkGjXrxEfBdf1PaDCMMXqoZVWArLpvoDTT1TZbQVkq7GfCfH6Ag;3:CHWaRRrN7A3GOeVi9fQMgTWYXhW5VoJKeGeHJKmSmMbHeiZYGhueKXzQFmp7zTmcMWl7O2UKvuJ1OLcboS4sldSrj/feCohbh6Ryi9JdQ6jS6VvLeYihe3EJ6fIQSplZ X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HE1PR07MB1275; X-Microsoft-Exchange-Diagnostics: 1;HE1PR07MB1275;25:iw0z/6BAtium91cUTtypeUqbE4XXDlPliF7kIr4TlRfbp1puJ1hBeD7MGuNfo2bWdznqbfEkrZ/3d0MXTC9Pl1kwVVeHjpoeSSTmrW++Hfh1iox7Svu4drLttOt0QnxOx2/UWEQ5uL/WnnF+f9x2H8uDyReFYmJd9YLw6wGbOCRd5IjiXWWgJS0OwQgWn4HGVPJKlxgFaPWdSeg5n1pi7UM1Pp59a7Hvk90u1xLk2Bcmo7XcYmAe3GHGr3iYwm09tk/9XFjUZebRkMlpWGcw2Ic1FW+JLzxt4AKP/B9vMEnYBFQEFNj1FqhjSJd32wzTYH3yFATXZJaK3AEtOw5EvJuSi8QTZQd765oZ2WMgk5BTkIdNaadGZITgZCTWKG6s68wE+8Yls9aJdK0aBZJqGU9+jaz5DFu8gL1T/HfFHQM2hV4BrNZs3GR/X1UIZCaBGqCu702XvfOK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prLTeF9P+vETWpBb82Njw/R/biSeCcmQ+oG+XiuY1InR3UC12Hx5oFgjqZS X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(37575265505322); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:HE1PR07MB1275;BCL:0;PCL:0;RULEID:;SRVR:HE1PR07MB1275; X-Microsoft-Exchange-Diagnostics: 1;HE1PR07MB1275;4:mgZX/7e/xd1AaTwHp6cZdDqN0hYdHPQHDtzlEfu+hs2p0fyVYxVwTM/EJ3hYlBusN8q5gv6+0KuzMZbjT9LwGOdXP6c2JACtHRU2FuEhWLL96BBKugoZ8Wt9rYxfDbPTpp/EJO4JvZ0nQ3/AZxwM80k2bJdjGRbOzdWkaWPnp9KH50Jj7I2cA14BpmdKX+tjTAJc3t9Z/szmBzWr56AiH7+LcgFrNHzbKPiK68TrUx211Qx1rkflTimWuPKKLsxge8Jm/cLJtw44jJDaPCgu0vxJPjTG5gEBXfmoGVNWxDQ8JUhzg2yZty6ahnawASSYjhlERAN6X8BBIEbuvKITarXQXjvX4PHcseczjW+++A3bTAhlr5eWI+WwTHLpo3WB0Tt14dt02/hsrLXkf1it6RTSjKWUzUpVYiDAUZV5GCE7s75+1pcr/Nxwiu0JDd0y X-Forefront-PRVS: 006339698F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(54534003)(189002)(4001430100002)(15650500001)(5890100001)(19580405001)(189998001)(101416001)(50466002)(8676002)(2906002)(586003)(229853001)(450100001)(2351001)(97736004)(50226002)(19580395003)(4326007)(575784001)(81156014)(86362001)(81166006)(5660300001)(47776003)(66066001)(5003940100001)(105586002)(6116002)(3846002)(68736007)(48376002)(42186005)(106356001)(92566002)(50986999)(7846002)(305945005)(36756003)(33646002)(77096005)(7736002)(107886002)(110136003);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR07MB1275;H:emalape-Latitude-E6540.dyn.mo.ca.am.ericsson.se;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;HE1PR07MB1275;23:sBZgAg+w7+B3xnWRA1X66NnWtoDhIQwYBAQCbvAGF?= =?us-ascii?Q?ZuOMQJcGj7BLFK6xB/Vfmpo6PQdh83Gkhvn5WUj4PoiRGVurQUzRJlg+BCQy?= =?us-ascii?Q?zwcFOxeDyzgllhOaaRMNqIxiGzhqCmCtm3UN7TsNW1zca/O9WqRvCv8jnLDL?= =?us-ascii?Q?C7m2VB0qNnLcP8wRJNWcPampG3Z4jSfKlEoWeOKXPoq15ypXDmBC7VoWeiOc?= =?us-ascii?Q?oDY6RwoN1/nzJw0J6oUHzgrCduI7TsbOQygYMRMh3nP4zqoUqswgn0zxhr7B?= =?us-ascii?Q?I23wFw+/uEeiMXLg2okQXwt79mKSHN0f4ufwta61QwG+HfIs9+seeHFRB80Y?= =?us-ascii?Q?csgTSkljhUxQ8B0B67yTDGIYuSli5j1peKJbsWgMxfNIsqnF+sWctt3j4zK9?= =?us-ascii?Q?UXJ2OCMi+YSUegviIjQmdz4dbF1HuePZDYOIrjtTMHzHwaKoBnlwPLWClcHf?= =?us-ascii?Q?IKLhjJVn0BpHDLujcWX7FPVCKyjxpmAFra+Wdfkvj5Te9TAoCrwgAHxwSwrJ?= =?us-ascii?Q?cdaKpP7vMVMvojWgcgJZQDU8spTrDElQnB2NeQNKvhHfM4hg9+qf7z7vj8bX?= =?us-ascii?Q?GAzro91fiPJzVGWv4HaBHBFgNJ3Ozgfyas/NgQW7Q87TtYvaskBxDf+p0LE4?= =?us-ascii?Q?2zMGEjX5zBRnPHD2mvuq+ZmieVn/PPWpZ/wmWJLPEE3li2gvkU1inLMfZ0vV?= =?us-ascii?Q?qLKh6mxeqJ2jYwJw6NCdsDd4IUqxX00o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3eqT4pPD2WvKBHSKhL+MgbfFIv6sTX9sTmWQjiGSK2AWimbud7GTYObr9Q==;24:/UDr/E9AxuFUgp91scScQ73Vdy8eQH6qGM+xkI3YloGWoecZnLJwX9gtsztR+EFqt2fZFD/kvhu5F1N5keAMPaJk1SPlWsKJN5uFxERRarE=;7:m3WzEP2szDupPeHJkawOuhdFws/Z9IAbGsCTV8Y65sGHuzhlP5tDgBGOEjGU4IPZ35892RCCjal90GZG5VurvFPqNUOHNRitsoXp9z5O9ylTOiuTzfNxboklZM0Vcce+yYITQG6BsMtJLYH7EAkJDnk7kOT0x4FvD0ZjmOoRU+wRQKCFNmJ72USIw8aQeY9+awIH85H4/49wYwU1YO5RL1UieXvja/eGFAJbvKW7WcbcEvOSLiFbx30zEUS4ZJVf SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2016 20:28:00.3398 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB1275 X-OriginatorOrg: ericsson.com X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00091.txt.bz2 The target parameter in both solib_add and update_solib_list functions is not used anymore and as not been used for a while. This change removes the parameter to clean up the code a little bit. gdb/ChangeLog: * infcmd.c (post_create_inferior): Remove unused argument in call to solib_add. * remote.c (remote_start_remote): Likewise. * solib-frv.c (frv_fetch_objfile_link_map): Likewise. * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise. (enable_break): Likewise. * solib.c (update_solib_list): Remove unused target argument and its documentation. (solib_add): Remove unused target argument. Remove unused argument in call to update_solib_list. (info_sharedlibrary_command): Remove unused argument in call to update_solib_list. (sharedlibrary_command): Remove unused argument in call to solib_add. (handle_solib_event): Likewise. (reload_shared_libraries): Likewise. * solib.h (solib_add): Remove unused target argument. Signed-off-by: Marc-Andre Laperle --- gdb/infcmd.c | 2 +- gdb/remote.c | 2 +- gdb/solib-frv.c | 2 +- gdb/solib-svr4.c | 6 +++--- gdb/solib.c | 28 ++++++++++------------------ gdb/solib.h | 2 +- 6 files changed, 17 insertions(+), 25 deletions(-) diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 44a1fd1..b0daadb 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -458,7 +458,7 @@ post_create_inferior (struct target_ops *target, int from_tty) /* If the solist is global across processes, there's no need to refetch it here. */ if (!gdbarch_has_global_solist (target_gdbarch ())) - solib_add (NULL, 0, target, auto_solib_add); + solib_add (NULL, 0, auto_solib_add); } } diff --git a/gdb/remote.c b/gdb/remote.c index 13258b9e..428b3cc 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -4097,7 +4097,7 @@ remote_start_remote (int from_tty, struct target_ops *target, int extended_p) /* On OSs where the list of libraries is global to all processes, we fetch them early. */ if (gdbarch_has_global_solist (target_gdbarch ())) - solib_add (NULL, from_tty, target, auto_solib_add); + solib_add (NULL, from_tty, auto_solib_add); if (target_is_non_stop_p ()) { diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c index 56ccb88..d6b2007 100644 --- a/gdb/solib-frv.c +++ b/gdb/solib-frv.c @@ -1145,7 +1145,7 @@ frv_fetch_objfile_link_map (struct objfile *objfile) /* Cause frv_current_sos() to be run if it hasn't been already. */ if (main_lm_addr == 0) - solib_add (0, 0, 0, 1); + solib_add (0, 0, 1); /* frv_current_sos() will set main_lm_addr for the main executable. */ if (objfile == symfile_objfile) diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index fe36d45..2e2de5f 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -1614,7 +1614,7 @@ svr4_fetch_objfile_link_map (struct objfile *objfile) /* Cause svr4_current_sos() to be run if it hasn't been already. */ if (info->main_lm_addr == 0) - solib_add (NULL, 0, ¤t_target, auto_solib_add); + solib_add (NULL, 0, auto_solib_add); /* svr4_current_sos() will set main_lm_addr for the main executable. */ if (objfile == symfile_objfile) @@ -2273,7 +2273,7 @@ enable_break (struct svr4_info *info, int from_tty) mean r_brk has already been relocated. Assume the dynamic linker is the object containing r_brk. */ - solib_add (NULL, from_tty, ¤t_target, auto_solib_add); + solib_add (NULL, from_tty, auto_solib_add); sym_addr = 0; if (info->debug_base && solib_svr4_r_map (info) != 0) sym_addr = solib_svr4_r_brk (info); @@ -2451,7 +2451,7 @@ enable_break (struct svr4_info *info, int from_tty) info->debug_loader_name = xstrdup (interp_name); info->debug_loader_offset_p = 1; info->debug_loader_offset = load_addr; - solib_add (NULL, from_tty, ¤t_target, auto_solib_add); + solib_add (NULL, from_tty, auto_solib_add); } /* Record the relocated start and end address of the dynamic linker diff --git a/gdb/solib.c b/gdb/solib.c index 2235505..eefd6fb 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -751,17 +751,10 @@ solib_used (const struct so_list *const known) to the list, and leave their symbols_loaded flag clear. If FROM_TTY is non-null, feel free to print messages about what - we're doing. + we're doing. */ - If TARGET is non-null, add the sections of all new shared objects - to TARGET's section table. Note that this doesn't remove any - sections for shared objects that have been unloaded, and it - doesn't check to see if the new shared objects are already present in - the section table. But we only use this for core files and - processes we've just attached to, so that's okay. */ - -static void -update_solib_list (int from_tty, struct target_ops *target) +void +update_solib_list (int from_tty) { const struct target_so_ops *ops = solib_ops (target_gdbarch ()); struct so_list *inferior = ops->current_sos(); @@ -962,11 +955,10 @@ libpthread_solib_p (struct so_list *so) If READSYMS is 0, defer reading symbolic information until later but still do any needed low level processing. - FROM_TTY and TARGET are as described for update_solib_list, above. */ + FROM_TTY is described for update_solib_list, above. */ void -solib_add (const char *pattern, int from_tty, - struct target_ops *target, int readsyms) +solib_add (const char *pattern, int from_tty, int readsyms) { struct so_list *gdb; @@ -991,7 +983,7 @@ solib_add (const char *pattern, int from_tty, error (_("Invalid regexp: %s"), re_err); } - update_solib_list (from_tty, target); + update_solib_list (from_tty); /* Walk the list of currently loaded shared libraries, and read symbols for any that match the pattern --- or any whose symbols @@ -1076,7 +1068,7 @@ info_sharedlibrary_command (char *pattern, int from_tty) /* "0x", a little whitespace, and two hex digits per byte of pointers. */ addr_width = 4 + (gdbarch_ptr_bit (gdbarch) / 4); - update_solib_list (from_tty, 0); + update_solib_list (from_tty); /* make_cleanup_ui_out_table_begin_end needs to know the number of rows, so we need to make two passes over the libs. */ @@ -1293,7 +1285,7 @@ static void sharedlibrary_command (char *args, int from_tty) { dont_repeat (); - solib_add (args, from_tty, (struct target_ops *) 0, 1); + solib_add (args, from_tty, 1); } /* Implements the command "nosharedlibrary", which discards symbols @@ -1340,7 +1332,7 @@ handle_solib_event (void) be adding them automatically. Switch terminal for any messages produced by breakpoint_re_set. */ target_terminal_ours_for_output (); - solib_add (NULL, 0, ¤t_target, auto_solib_add); + solib_add (NULL, 0, auto_solib_add); target_terminal_inferior (); } @@ -1458,7 +1450,7 @@ reload_shared_libraries (char *ignored, int from_tty, removed. Call it only after the solib target has been initialized by solib_create_inferior_hook. */ - solib_add (NULL, 0, NULL, auto_solib_add); + solib_add (NULL, 0, auto_solib_add); breakpoint_re_set (); diff --git a/gdb/solib.h b/gdb/solib.h index 00fd6cb..75490b6 100644 --- a/gdb/solib.h +++ b/gdb/solib.h @@ -33,7 +33,7 @@ extern void clear_solib (void); /* Called to add symbols from a shared library to gdb's symbol table. */ -extern void solib_add (const char *, int, struct target_ops *, int); +extern void solib_add (const char *, int, int); extern int solib_read_symbols (struct so_list *, int); /* Function to be called when the inferior starts up, to discover the -- 2.7.4