From patchwork Wed May 21 08:26:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 1045 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx22.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 8F420360073 for ; Wed, 21 May 2014 01:29:42 -0700 (PDT) Received: by homiemail-mx22.g.dreamhost.com (Postfix, from userid 14314964) id 4C0EC5B697A7; Wed, 21 May 2014 01:29:41 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx22.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx22.g.dreamhost.com (Postfix) with ESMTPS id 87A675B18B74 for ; Wed, 21 May 2014 01:29:41 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=kGDB+vkWPM2VpLybVUBUNt5+7Fini /s9wC65kOqAGSqdlEglMJ8VY6wrazsQWO1iWzyREqYn0KOllp5jeYZwzddegLewx /zB6PVOYWnm8S+pO+GJkdBN/nmm2BMv15wGImcTuWd+AMmVMG5yCZRiVpTnXM8Vx 2T6hCcZtBw1WrE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=tqAgXyYNA9KEri1tmhF+qWO7igs=; b=YxJ 7zS4w00iFLAkK3nHMtSfWeZURwgDZHYOArU6iNenfj2HItChFM0j9r/Sw0qCw4j0 2PGYC9XtjWQ5h2LXYe+pmHINiS1MoaHiwVYqrT3BbuMW85TdCoDFbx0OFAvMOERz sKxDMMt/WIYgnkYpmwkrAb1Ndxi0phdyG0/c9QaM= Received: (qmail 21195 invoked by alias); 21 May 2014 08:29:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 21183 invoked by uid 89); 21 May 2014 08:29:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 May 2014 08:29:38 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Wn1u3-0005IX-6v from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Wed, 21 May 2014 01:29:35 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 21 May 2014 01:29:35 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Wed, 21 May 2014 01:29:34 -0700 From: Yao Qi To: Subject: [PATCH OBV] Specify source file explicitly when setting a breakpoint Date: Wed, 21 May 2014 16:26:53 +0800 Message-ID: <1400660813-23250-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in When I run no-thread-db.exp, the breakpoint is set on line 26. However, the breakpoint is set to line 26 of dl-start.S rather than no-thread-db.c, which is not intended. (gdb) monitor set libthread-db-search-path /foo/bar^M libthread-db-search-path set to `/foo/bar'^M (gdb) PASS: gdb.server/no-thread-db.exp: libthread-db is now unresolvable break 26^M Breakpoint 1 at 0x48018078: file ../sysdeps/powerpc/powerpc32/dl-start.S, line 26.^M (gdb) continue^M Continuing. This patch is to change the breakpoint setting with source file specified, then it is correct now. I'll check it in. gdb/testsuite: 2014-05-21 Yao Qi * gdb.server/no-thread-db.exp: Specify source file name explicitly. --- gdb/testsuite/gdb.server/no-thread-db.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.server/no-thread-db.exp b/gdb/testsuite/gdb.server/no-thread-db.exp index 9246fa9..8a9c291 100644 --- a/gdb/testsuite/gdb.server/no-thread-db.exp +++ b/gdb/testsuite/gdb.server/no-thread-db.exp @@ -47,7 +47,7 @@ gdb_test "monitor set libthread-db-search-path ${unresolvable_thread_db_path}" \ "libthread-db is now unresolvable" # Continue past tls assignment to make sure tls storage is allocated. -gdb_breakpoint [gdb_get_line_number "after tls assignment"] +gdb_breakpoint ${srcfile}:[gdb_get_line_number "after tls assignment"] gdb_continue_to_breakpoint "after tls assignment" # Printing a tls variable should fail gracefully without a libthread_db.