From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id A6C8B3858D28 for ; Tue, 2 May 2023 14:54:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A6C8B3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683039276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BRJQw5Czlbm/9w2yzfxXY2jWjWHBEUgdKlVzVmxxEGQ=; b=ZgSGV5R9z+Z3Q+kabQvQoZrTK310SiAJne+NdwW2H89YvYVN2LxUaj4g6IK1GKB5Mbav2v cbwhVPHc3kAq7t+uPbwoxWmi+z6HXf5FoYPHPwgByUgAOpkJy7a1lOWZZ6JXyhZ9+Gzcnt GPjm9RTaFs1JATzK6a8VUD57bE1f89Y= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-554-jbZFaZB0OH-m3NAcA1VMYA-1; Tue, 02 May 2023 10:54:10 -0400 X-MC-Unique: jbZFaZB0OH-m3NAcA1VMYA-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3f321e60feaso12931925e9.0 for ; Tue, 02 May 2023 07:54:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683039245; x=1685631245; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BRJQw5Czlbm/9w2yzfxXY2jWjWHBEUgdKlVzVmxxEGQ=; b=fcsME31Uesb5NANdQ7Zmo3V8ZxNNoGT6Ov6tOJ2zDNTNouUpJlYor68Dm6hdLW+r25 KJz8Haq/RihwDznB7tXzaX8gA8Jt4RfYVdS3sLMYS1ImhTi3L3EEfCyAukJcwRDfxvon Mw6QtOaxbQgjo5FL4gNep74qgXLTSJ+6LFooe+GIzojqTQ5QVDHPYf2C9WXmaEcc7CXZ j6aQ20BeOR7nNBWjHiuEMCxSUyfLbTwzIxthnhA+sFwdmajV19RzPt9MSmd9Vhern6eb 3UlyC9jnsLaNcTAIIL3uh40fXueh57X+PqTiZClydfxhc1D9B8KG1NNOWvEKac1M9UWz D2Sw== X-Gm-Message-State: AC+VfDzO0vGHWQ67Ys14R5PFCMn81Ciri0LkiNb+pE1xgIp+lMvSMFFm J7MMXcZb/kwFGUmXK3hidLh6WQd/Fz1fXyzrPvq7NH9xKnip469+2EmdjIq61XU5ZiP3lyKKJ0U wKxpBpFEwRyeVCfVocMpsSw== X-Received: by 2002:adf:dc8e:0:b0:306:2b31:5935 with SMTP id r14-20020adfdc8e000000b003062b315935mr5748362wrj.55.1683039245504; Tue, 02 May 2023 07:54:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Ubs+FT0RPYfD+BSzXIA8ZhWOspssz0fI7m59Bc5wW4CsslQq0DM7EhuIJtdjSHU0lkPsXSw== X-Received: by 2002:adf:dc8e:0:b0:306:2b31:5935 with SMTP id r14-20020adfdc8e000000b003062b315935mr5748353wrj.55.1683039245253; Tue, 02 May 2023 07:54:05 -0700 (PDT) Received: from localhost (11.72.115.87.dyn.plus.net. [87.115.72.11]) by smtp.gmail.com with ESMTPSA id w12-20020adff9cc000000b0030635f6949fsm2496829wrr.103.2023.05.02.07.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 07:54:04 -0700 (PDT) From: Andrew Burgess To: "Puputti, Matti" , "gdb-patches@sourceware.org" Cc: "blarsen@redhat.com" Subject: RE: [PATCH v3 1/1] gdb, infcmd: Support jump command with same line in multiple symtabs In-Reply-To: References: <20230417113243.2822544-1-matti.puputti@intel.com> <87zg6s9ikn.fsf@redhat.com> Date: Tue, 02 May 2023 15:54:03 +0100 Message-ID: <87lei69438.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: "Puputti, Matti" writes: > Hi Andrew, > > Thank you for your comments. > I plan to follow all your suggestions in the next patch. > > On the document update, what you think about this proposal: > "If @var{locspec} resolves to more than one address, > those outside the current compilation unit are ignored. If still not a > unique address found, the command aborts before jumping. " Sounds reasonable to me, I'm sure Eli will provide a proper docs review when the patch is posted. Thanks, Andrew > > Br, > Matti Puputti > >> -----Original Message----- >> From: Andrew Burgess >> Sent: Friday, April 28, 2023 4:40 PM >> To: Puputti, Matti ; gdb-patches@sourceware.org >> Cc: blarsen@redhat.com >> Subject: Re: [PATCH v3 1/1] gdb, infcmd: Support jump command with same >> line in multiple symtabs >> > > < . . . > > >> > + sals.erase (std::remove_if (sals.begin (), sals.end (), >> > + [] (symtab_and_line &sal) >> > + { >> > + struct symtab_and_line cursal >> > + = get_current_source_symtab_and_line (); >> > + return sal.symtab != cursal.symtab; >> >> Maybe worrying about nothing, but I wonder if we should move the call to >> get_current_source_symtab_and_line outside of the lambda, and then >> capture cursal by reference. >> >> Also, the 'symtab_and_line &sal' can be made const. >> >> > + }), sals.end ()); >> > + if (sals.size () != 1) >> > + error (_("Unreasonable jump request")); >> > + } >> >> This all makes sense, but I think you need to update the docs. The docs >> currently say: >> >> ... If @var{locspec} resolves to more than one address, the command >> aborts before jumping. >> >> Which isn't true any more right? >> > > < . . . > > >> > + >> > +standard_testfile .c >> > +set srcfile2 jump_multiple_objfiles_foo.c >> > +set srcfile3 jump_multiple_objfiles.h >> >> If you rename 'jump_multiple_objfiles_foo.c' to >> 'jump_multiple_objfiles-foo.c', then you can replace these three lines >> with: >> >> standard_testfile .c -foo.c .h >> >> which is the preferred approach these days. >> > > < . . . > > >> > + >> > +if { ![runto_main] } { >> > + perror "couldn't run to breakpoint" >> >> Drop this perror call. runto_main will FAIL if appropriate. >> >> Thanks, >> Andrew >> > > < . . . > > Intel Deutschland GmbH > Registered Address: Am Campeon 10, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, www.intel.de > Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva > Chairperson of the Supervisory Board: Nicole Lau > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928