From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27543 invoked by alias); 1 Mar 2011 22:51:53 -0000 Received: (qmail 27532 invoked by uid 22791); 1 Mar 2011 22:51:52 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Mar 2011 22:51:48 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id E99085900E; Tue, 1 Mar 2011 14:51:45 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost4.vmware.com (Postfix) with ESMTP id E2763C9F89; Tue, 1 Mar 2011 14:51:45 -0800 (PST) Message-ID: <4D6D7881.8000304@vmware.com> Date: Tue, 01 Mar 2011 22:51:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: "gdb-patches@sourceware.org" , Pedro Alves Subject: [RFA] breakpoint.c, update_static_tracepoint, variable same name as param. Content-Type: multipart/mixed; boundary="------------040802060407050200060702" X-IsSubscribed: yes 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 X-SW-Source: 2011-03/txt/msg00066.txt.bz2 This is a multi-part message in MIME format. --------------040802060407050200060702 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 106 Note, this is just the simple-minded suggestion -- there might actually be a bug hidden here. Comments? --------------040802060407050200060702 Content-Type: text/plain; name="shadow9.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="shadow9.txt" Content-length: 2382 2011-03-01 Michael Snyder * breakpoint.c (update_static_tracepoint): Rename inner block var which shadows function parameter. Index: breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.546 diff -u -p -u -p -r1.546 breakpoint.c --- breakpoint.c 1 Mar 2011 02:16:56 -0000 1.546 +++ breakpoint.c 1 Mar 2011 22:49:01 -0000 @@ -10301,7 +10301,7 @@ update_static_tracepoint (struct breakpo if (!VEC_empty(static_tracepoint_marker_p, markers)) { - struct symtab_and_line sal; + struct symtab_and_line sal2; struct symbol *sym; struct static_tracepoint_marker *marker; @@ -10314,11 +10314,11 @@ update_static_tracepoint (struct breakpo "found at previous line number"), b->number, b->static_trace_marker_id); - init_sal (&sal); + init_sal (&sal2); - sal.pc = marker->address; + sal2.pc = marker->address; - sal = find_pc_line (marker->address, 0); + sal2 = find_pc_line (marker->address, 0); sym = find_pc_sect_function (marker->address, NULL); ui_out_text (uiout, "Now in "); if (sym) @@ -10327,31 +10327,31 @@ update_static_tracepoint (struct breakpo SYMBOL_PRINT_NAME (sym)); ui_out_text (uiout, " at "); } - ui_out_field_string (uiout, "file", sal.symtab->filename); + ui_out_field_string (uiout, "file", sal2.symtab->filename); ui_out_text (uiout, ":"); if (ui_out_is_mi_like_p (uiout)) { - char *fullname = symtab_to_fullname (sal.symtab); + char *fullname = symtab_to_fullname (sal2.symtab); if (fullname) ui_out_field_string (uiout, "fullname", fullname); } - ui_out_field_int (uiout, "line", sal.line); + ui_out_field_int (uiout, "line", sal2.line); ui_out_text (uiout, "\n"); - b->line_number = sal.line; + b->line_number = sal2.line; xfree (b->source_file); if (sym) - b->source_file = xstrdup (sal.symtab->filename); + b->source_file = xstrdup (sal2.symtab->filename); else b->source_file = NULL; xfree (b->addr_string); b->addr_string = xstrprintf ("%s:%d", - sal.symtab->filename, b->line_number); + sal2.symtab->filename, b->line_number); /* Might be nice to check if function changed, and warn if so. */ --------------040802060407050200060702--