From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96588 invoked by alias); 26 Jun 2015 12:57:49 -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 96567 invoked by uid 89); 26 Jun 2015 12:57:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f201.google.com Received: from mail-pd0-f201.google.com (HELO mail-pd0-f201.google.com) (209.85.192.201) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 26 Jun 2015 12:57:42 +0000 Received: by pdjp10 with SMTP id p10so8387116pdj.0 for ; Fri, 26 Jun 2015 05:57:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:message-id:date:subject:from:to:cc :content-type; bh=TdtkqES5J89Fi6abDpzGCJk8JYocgN1HkUKzcLJH2QI=; b=Zdr4EausJBaHcZsiFAY8sJ5IHQZZWPrDuC9ttWVagFSI8f19pnUyAPm3Hvn8dJspeS UwpeyblWW9448tAudBrT5UaUGVzbuLwqJ29spDXwkWc6aeFdDStpCG6krHKS4ZIbRcdN L1fhVkzVJhk3f9IcnOcXl4qe0GwjCaYMbvuzh1aJ8BAHtRf6lOy+1ZvTohZZJn0bkr1V 5n0sPhHIQeOsnyumNiCpRSRpkp4TI1z8ypcK803jXMsWHK2wONE2dKP/25FQHPppeNLG 7VUv3Z0CWA4iINy7bh/ydWOn4ZSprqXs2wAKtjzNjv45KphHYw45sWNXwMR0QUpH120t IfBg== X-Gm-Message-State: ALoCoQkBMLpoTTKUqvBx3V52nLkpZ1TPUdCCF8g1p9XYqr4iWUywrI566stMmIDy1ch8JzMBg1HN MIME-Version: 1.0 X-Received: by 10.66.196.195 with SMTP id io3mr1655069pac.32.1435323461309; Fri, 26 Jun 2015 05:57:41 -0700 (PDT) Message-ID: <047d7bf0f1c80cced205196b4997@google.com> Date: Fri, 26 Jun 2015 12:57:00 -0000 Subject: Re: [patchv2] Do not skip prologue for asm (.S) files From: Doug Evans To: Jan Kratochvil Cc: gdb-patches , Sergio Durigan Junior Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00564.txt.bz2 Jan Kratochvil writes: > On Thu, 25 Jun 2015 22:42:48 +0200, Doug Evans wrote: > > Hmmm, so there's an undocumented requirement that minsym_found > > and find_function_start_sal work compatibly? > > [Which is actually not surprising if you know how linespecs and > > breakpoints: we find all the matching minsyms and fullsyms > > and then throw away the duplicates. But if these two functions > > behave differently then the search for duplicates fails. At least > > I'm guessing that's what happened here.] > > Yes: > # (gdb) file /root/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.base/breako2 > # Reading symbols from /root/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.base/breako2...done. > # (gdb) break main > #-Breakpoint 1 at 0x10000644: file ./gdb.base/break.c, line 43. > #-(gdb) PASS: gdb.base/break.exp: breakpoint function, optimized file > #+Breakpoint 1 at 0x10000640: main. (2 locations) > #### Num Type Disp Enb Address What > #### 1 breakpoint keep y > #### 1.1 y 0x0000000010000640 in main at ./gdb.base/break.c:42 > #### 1.2 y 0x0000000010000644 in main at ./gdb.base/break.c:43 > #+(gdb) FAIL: gdb.base/break.exp: breakpoint function, optimized file > # break marker4 > # Breakpoint 2 at 0x10000aa0: file ./gdb.base/break1.c, line 59. > # (gdb) PASS: gdb.base/break.exp: breakpoint small function, optimized file > #[...] > # Continuing. > #-720 > #-Breakpoint 2, marker4 (d=177601976) at ./gdb.base/break1.c:59 > #-59 void marker4 (long d) { values[0].a_field = d; } /* set breakpoint 14 here */ > #-(gdb) PASS: gdb.base/break.exp: run until breakpoint set at small function, optimized file (line bp_location14) > #+Breakpoint 1, main (argc=1, argv=0x3fffffffec48, envp=0x3fffffffec58) at ./gdb.base/break.c:43 > #+43 if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */ > #+(gdb) FAIL: gdb.base/break.exp: run until breakpoint set at small function, optimized file > > > > Can you do that, plus add a comment to both minsym_found > > and find_function_start_sal stating that we rely on them > > working compatibly. > > Done. Providing for review the final patch given all the changes. > > > Thanks, > Jan > gdb/ChangeLog > 2015-06-26 Jan Kratochvil > > * linespec.c (minsym_found): Reset sal.PC for COMPUNIT_LOCATIONS_VALID > and language_asm.. > * symtab.c (find_function_start_sal): Likewise. > > gdb/testsuite/ChangeLog > 2015-06-20 Jan Kratochvil > > * gdb.arch/amd64-prologue-skip.S: New file. > * gdb.arch/amd64-prologue-skip.exp: New file. LGTM. Thanks!