From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20958 invoked by alias); 30 Mar 2010 00:25:22 -0000 Received: (qmail 20946 invoked by uid 22791); 30 Mar 2010 00:25:22 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Mar 2010 00:25:18 +0000 Received: (qmail 25037 invoked from network); 30 Mar 2010 00:25:16 -0000 Received: from unknown (HELO macbook-2.local) (stan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 30 Mar 2010 00:25:16 -0000 Message-ID: <4BB144E7.1080800@codesourcery.com> Date: Tue, 30 Mar 2010 00:25:00 -0000 From: Stan Shebs User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [PATCH] Whack some dead code Content-Type: multipart/mixed; boundary="------------030107060402020301090905" 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: 2010-03/txt/msg01037.txt.bz2 This is a multi-part message in MIME format. --------------030107060402020301090905 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 350 A while back, Vladimir Prus noticed a chunk of dead code in trace_find_line_command; basically, if you don't have symbolic info, there is no plausible fallback for line numbers, you just have to give up. Committed to trunk. Stan 2010-03-29 Stan Shebs * tracepoint.c (trace_find_line_command): Remove dead code. --------------030107060402020301090905 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="deadcode-patch-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="deadcode-patch-1" Content-length: 1719 Index: tracepoint.c =================================================================== RCS file: /cvs/src/src/gdb/tracepoint.c,v retrieving revision 1.163 retrieving revision 1.164 diff -p -r1.163 -r1.164 *** tracepoint.c 29 Mar 2010 23:45:06 -0000 1.163 --- tracepoint.c 30 Mar 2010 00:19:43 -0000 1.164 *************** trace_find_line_command (char *args, int *** 2043,2075 **** sals.sals[0] = sal; } else ! { sals = decode_line_spec (args, 1); sal = sals.sals[0]; } old_chain = make_cleanup (xfree, sals.sals); if (sal.symtab == 0) ! { ! printf_filtered ("TFIND: No line number information available"); ! if (sal.pc != 0) ! { ! /* This is useful for "info line *0x7f34". If we can't ! tell the user about a source line, at least let them ! have the symbolic address. */ ! printf_filtered (" for address "); ! wrap_here (" "); ! print_address (get_current_arch (), sal.pc, gdb_stdout); ! printf_filtered (";\n -- will attempt to find by PC. \n"); ! } ! else ! { ! printf_filtered (".\n"); ! return; /* No line, no PC; what can we do? */ ! } ! } ! else if (sal.line > 0 ! && find_line_pc_range (sal, &start_pc, &end_pc)) { if (start_pc == end_pc) { --- 2043,2058 ---- sals.sals[0] = sal; } else ! { sals = decode_line_spec (args, 1); sal = sals.sals[0]; } old_chain = make_cleanup (xfree, sals.sals); if (sal.symtab == 0) ! error (_("No line number information available.")); ! ! if (sal.line > 0 && find_line_pc_range (sal, &start_pc, &end_pc)) { if (start_pc == end_pc) { --------------030107060402020301090905--