From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32733 invoked by alias); 1 Dec 2019 22:08:25 -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 32724 invoked by uid 89); 1 Dec 2019 22:08:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Spam-Relays-External:209.85.128.67, H*RU:209.85.128.67, 2001, moved X-HELO: mail-wm1-f67.google.com Received: from mail-wm1-f67.google.com (HELO mail-wm1-f67.google.com) (209.85.128.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 01 Dec 2019 22:08:23 +0000 Received: by mail-wm1-f67.google.com with SMTP id y23so9347315wma.0 for ; Sun, 01 Dec 2019 14:08:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gSIjXftAfBr48qt3vCTOX9KvS//479qvS8I8WOsmD8E=; b=b+3z2VVc7cEmMzUEJs0Y5rahTwO3clHJrOpm9CesdhmNCxpdjNYQlnoKvwFxUmIoWJ UK2azJMZNf6Ihy/pPC4jd8/T3t+c1nGH5r6GKxDHjREwkA28rIqqxwKyafAyieiKWQXs kpJbcmrAuMrUKs2vJC8d1noUs7DYU08B6/90z7LooqZ6TuKdR08iMbXmlr/eM6YhJj9j H5GHsBpHyhw0Q67RySuJCDC4Iu7YQhgPbCl+wEU8a8BS09KYfrnusqCZIPvfzbF3wF6K h1n1QKgH7vUEgHO6ZKfcE+DvV3rUfZjQx9jwjGjGqpu8V6wjsNLPA/PpwlRlHB/bLXdR GJxA== Return-Path: Received: from localhost (host109-151-46-117.range109-151.btcentralplus.com. [109.151.46.117]) by smtp.gmail.com with ESMTPSA id f67sm21853841wme.16.2019.12.01.14.08.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 01 Dec 2019 14:08:20 -0800 (PST) Date: Sun, 01 Dec 2019 22:08:00 -0000 From: Andrew Burgess To: Bernd Edlinger Cc: "gdb-patches@sourceware.org" Subject: Re: [PATCH] Fix setting breakpoints or stepping on line 65535 Message-ID: <20191201220818.GI3410@embecosm.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Fortune: The disks are getting full User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2019-12/txt/msg00029.txt.bz2 * Bernd Edlinger [2019-11-24 11:54:23 +0000]: > Hi, > > this removes code that is present from the very first git revisison > 7b4ac7e1ed2c4616bce56d1760807798be87ac9e from 1988. It was in the > gdb/dbxread.c at the time (and makes more sense for dbx line info format > since line numbers are 16-bit entities in that debug format and debugging > files with more than 65535 lines would not work anyway) but moved from > there to gdb/buildsym.c which is used for dwarf line info as well, and > excluding an arbitrary line number does certainly not make sense nowadays. > > > Thanks > Bernd. > From f202ae765b72ad6d17600eb661993a63191309f7 Mon Sep 17 00:00:00 2001 > From: Bernd Edlinger > Date: Sat, 23 Nov 2019 07:37:26 +0100 > Subject: [PATCH 1/2] Fix setting breakpoints or stepping on line 65535 > Bernd, Thanks for looking into this, and especially thanks for adding a test! Normally you should include the git commit message and ChangeLog along with your patch submission so that these can be reviewed too. 'git format-patch' and 'git send-email' can be useful for this, if you can get them setup. Given the age of the code you're removing I think this change sounds reasonable. I assume there's no test that covers why this code should be there, so you see no regressions with this code removed? I have a couple of minor issues with the test. If you address those and repost with commit message and ChangeLog this can be approved. Thanks, Andrew > --- > gdb/buildsym.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/gdb/buildsym.c b/gdb/buildsym.c > index 79f8305..6c14f3f 100644 > --- a/gdb/buildsym.c > +++ b/gdb/buildsym.c > @@ -670,12 +670,6 @@ buildsym_compunit::record_line (struct subfile *subfile, int line, > { > struct linetable_entry *e; > > - /* Ignore the dummy line number in libg.o */ > - if (line == 0xffff) > - { > - return; > - } > - > /* Make sure line vector exists and is big enough. */ > if (!subfile->line_vector) > { > -- > 1.9.1 > > From 54a7631206a2cf54573fb4cc94474cb2f6f99245 Mon Sep 17 00:00:00 2001 > From: Bernd Edlinger > Date: Sun, 24 Nov 2019 09:37:22 +0100 > Subject: [PATCH 2/2] Add a test case for line 65535 > > --- > gdb/testsuite/gdb.base/line65535.c | 19 +++++++++++++++++++ > gdb/testsuite/gdb.base/line65535.exp | 26 ++++++++++++++++++++++++++ > 2 files changed, 45 insertions(+) > create mode 100644 gdb/testsuite/gdb.base/line65535.c > create mode 100644 gdb/testsuite/gdb.base/line65535.exp > > diff --git a/gdb/testsuite/gdb.base/line65535.c b/gdb/testsuite/gdb.base/line65535.c > new file mode 100644 > index 0000000..d80a294 > --- /dev/null > +++ b/gdb/testsuite/gdb.base/line65535.c > @@ -0,0 +1,19 @@ > +/* This testcase is part of GDB, the GNU debugger. > + > + Copyright 2019 Free Software Foundation, Inc. > + > + This program is free software; you can redistribute it and/or modify > + it under the terms of the GNU General Public License as published by > + the Free Software Foundation; either version 3 of the License, or > + (at your option) any later version. > + > + This program is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + GNU General Public License for more details. > + > + You should have received a copy of the GNU General Public License > + along with this program. If not, see . */ > + > +#line 65535 "line65535.c" > +int main() { return 0; } > diff --git a/gdb/testsuite/gdb.base/line65535.exp b/gdb/testsuite/gdb.base/line65535.exp > new file mode 100644 > index 0000000..2535ba5 > --- /dev/null > +++ b/gdb/testsuite/gdb.base/line65535.exp > @@ -0,0 +1,26 @@ > +# Copyright 2019 Free Software Foundation, Inc. > + > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 3 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program. If not, see . > + Normally we like to add a short description of what the test is doing here - for new tests. Many old ones don't have this thought. > +standard_testfile > + > +if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { > + return -1 > +} > + > +gdb_test "break $srcfile:65535" \ > + ".*Breakpoint 1 at .*: file $srcfile, line 65535\\..*" \ > + "break at line 65535" > + > +return 0 I don't think this return is needed at the end of a test. > -- > 1.9.1 >