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.129.124]) by sourceware.org (Postfix) with ESMTPS id 47FB93858C01 for ; Wed, 23 Aug 2023 09:33:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 47FB93858C01 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=1692783220; 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=uvSQuuuj1VXo6MECX/2ZQkN9XW0rg7JD/XQ9Ql/0lyU=; b=g3/TFTGK53YXRbK/6NJUkNrI6ls3E8eFfau/99aYRJfYUoSbdFyfw2NAwe2cI4tWoI1Zwb HYlze+JRI3uWpyEw0+5AEeTz6nK1qY4ABeL8Bv5WqlNTBz6OnD7BU+QW3uw4Izwo04RjWz Q/+dclyR6cxfwK9VLqbUxklJU9Jftt8= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-597-tYyOFdGoNd2TRnInO1s4dQ-1; Wed, 23 Aug 2023 05:33:38 -0400 X-MC-Unique: tYyOFdGoNd2TRnInO1s4dQ-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5219ceead33so3739832a12.2 for ; Wed, 23 Aug 2023 02:33:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692783217; x=1693388017; 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=uvSQuuuj1VXo6MECX/2ZQkN9XW0rg7JD/XQ9Ql/0lyU=; b=ilsmYj1qY6JNVODfQvuBwuNl+pa5ofJGOuHGqYKeL7v+nrvVoNjtPWZp9/pvG0H9gj lY3i1KDCC0/qWNka/jRJ3D5s+Nbpzij0opq7e8hC0jhrgtmSLRx4crQ1Uw61TnfZWH9q kFb5y0F7BlEKwaxW9GJuAlrlJULXoocVshkmS8/EbigZ3sJcDNulzlVg2lTwHzS6Xt9/ Hc6TYNDv/WtzxZ5ORff9PPYo2AeRLM6LT4rYKlTb2FNk4h04Jy6C7D0yoitM58gL9r+w D3xURTVb8DFJ6LNkVtqth0hYmGg49g9PXlUquKtsPkwepDOrdBVCCL9ctP32iJn7JZ6x uRWQ== X-Gm-Message-State: AOJu0Yz7zrFg7giwH6CJFsjofEmqIroFuAua7S1cQ+/42eddt8CxMI0c Kfa908EMEpjGDJyiyvolouBik+wbIhY8ztDikGT1fXF9nSw+zwHzns9/P8i5uPUA5oXygwb0fUu JfX2EWpuUtQyV9G2j5lV9jcVJqfqpSw== X-Received: by 2002:aa7:c603:0:b0:523:3fff:5ce2 with SMTP id h3-20020aa7c603000000b005233fff5ce2mr9182731edq.41.1692783217573; Wed, 23 Aug 2023 02:33:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHaWubukH5KOjAaBTIjxWZbCD2KG+DACbGFvRg01E62qAMUyFa8fhis7PrSDZ+fPTFY4BFQA== X-Received: by 2002:aa7:c603:0:b0:523:3fff:5ce2 with SMTP id h3-20020aa7c603000000b005233fff5ce2mr9182722edq.41.1692783217309; Wed, 23 Aug 2023 02:33:37 -0700 (PDT) Received: from localhost ([31.111.84.232]) by smtp.gmail.com with ESMTPSA id z12-20020aa7cf8c000000b005256d4d58a6sm9073710edx.18.2023.08.23.02.33.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 02:33:36 -0700 (PDT) From: Andrew Burgess To: Thiago Jung Bauermann Cc: pedro@palves.net, gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] gdb: MI stopped events when unwindonsignal is on In-Reply-To: <874jkwkob3.fsf@linaro.org> References: <87v8dnq6mh.fsf@linaro.org> <87edk5d6f3.fsf@redhat.com> <87v8dhp2lu.fsf@linaro.org> <87350jcb8p.fsf@redhat.com> <874jkwkob3.fsf@linaro.org> Date: Wed, 23 Aug 2023 10:33:35 +0100 Message-ID: <87fs4aays0.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.8 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_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,WEIRD_PORT 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: Thiago Jung Bauermann writes: > Hello Andrew, > > Andrew Burgess writes: > >> Thiago Jung Bauermann writes: >> >>> Hello Andrew, >>> >>> Andrew Burgess writes: >>> >>>> Thiago Jung Bauermann writes: >>>> >>>>> This test fails: >>>>> >>>>> Expecting: ^([ >>>>> ]+)?(terminate called after throwing an instance of 'int' >>>>> ~"\\nProgram" >>>>> ~" received signal SIGABRT, Aborted\.\\n" >>>>> ~"0x[0-9A-Fa-f]+ in [^ >>>>> ]+" >>>>> \*stopped,reason="signal-received",signal-name="SIGABRT"[^ >>>>> ]+frame=\{addr="0x[0-9A-Fa-f]+",[^ >>>>> ]+\}[^ >>>>> ]+ >>>>> &"Error in testing condition for breakpoint 2:\\n" >>>>> &"The program being debugged was signaled while in a function called from GDB\.\\n" >>>>> &"GDB remains in the frame where the signal was received\.\\n" >>>>> &"To change this behavior use \\"set unwindonsignal on\\"\.\\n" >>>>> &"Evaluation of the expression containing the function\\n" >>>>> &"\(cond_throw\(\)\) will be abandoned\.\\n" >>>>> &"When the function is done executing, GDB will silently stop\.\\n" >>>>> =breakpoint-modified,bkpt={number="2",type="breakpoint",[^ >>>>> ]+times="1",[^ >>>>> ]+}[ >>>>> ]+[(]gdb[)] >>>>> [ ]*) >>>>> terminate called after throwing an instance of 'int' >>>>> ~"\nProgram" >>>>> ~" received signal SIGABRT, Aborted.\n" >>>>> ~"__pthread_kill_implementation (threadid=281474842417696, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44\n" >>>>> &"44\t./nptl/pthread_kill.c: No such file or directory.\n" >>>>> *stopped,reason="signal-received",signal-name="SIGABRT",signal-meaning="Aborted",frame={addr="0x0000fffff7c5f200",func="__pthread_kill_implementation",args=[{name="threadid",value="281474842417696"},{name="signo",value="6"},{name="signo@entry",value="6"},{name="no_tid",value="0"},{name="no_tid@entry",value="0"}],file="./nptl/pthread_kill.c",fullname="./nptl/./nptl/pthread_kill.c",line="44",arch="aarch64"},thread-id="1",stopped-threads="all",core="78" >>>>> &"Error in testing condition for breakpoint 2:\n" >>>>> &"The program being debugged was signaled while in a function called from GDB.\n" >>>>> &"GDB remains in the frame where the signal was received.\n" >>>>> &"To change this behavior use \"set unwindonsignal on\".\n" >>>>> &"Evaluation of the expression containing the function\n" >>>>> &"(cond_throw()) will be abandoned.\n" >>>>> &"When the function is done executing, GDB will silently stop.\n" >>>>> =breakpoint-modified,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x0000aaaaaaaa087c",func="foo()",file="/home/tcwg-build/workspace/tcwg_gnu_5/abe/snapshots/gdb.git~master/gdb/testsuite/gdb.mi/mi-condbreak-throw.cc",fullname="/home/tcwg-build/workspace/tcwg_gnu_5/gdb/gdb/testsuite/gdb.mi/mi-condbreak-throw.cc",line="29",thread-groups=["i1"],cond="cond_throw ()",times="1",original-location="mi-condbreak-throw.cc:29"} >>>>> (gdb) >>>>> FAIL: gdb.mi/mi-condbreak-throw.exp: unwind_on_exception=off: wait for stop (unexpected output) >>>>> >>>>> It looks like the testcase isn't expecting these lines: >>>>> >>>>> ~"__pthread_kill_implementation (threadid=281474842417696, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44\n" >>>>> &"44\t./nptl/pthread_kill.c: No such file or directory.\n" >>>> >>>> Thanks for testing this, and highlighting this failure. >>>> >>>> I've included an updated patch below. I've made the test pattern a >>>> little more general so it should (I hope) handle the lines you are >>>> seeing. >>>> >>>> I'd be grateful if you could retest this new version and let me know if >>>> you are still seeing the failure. >>> >>> Thank you for the new version. Unfortunately I still see the failure. >>> I'm attaching the gdb.log file. >> >> Ok, I think I have it this time :) Maybe... >> >> ... would you be so kind as to give the version below a try please. > > Of course. Thank you for the new version. This one worked well. > > Running gdb.git~master/gdb/testsuite/gdb.mi/mi-condbreak-throw.exp ... > PASS: gdb.mi/mi-condbreak-throw.exp: unwind_on_exception=off: breakpoint at main > PASS: gdb.mi/mi-condbreak-throw.exp: unwind_on_exception=off: mi runto main > PASS: gdb.mi/mi-condbreak-throw.exp: unwind_on_exception=off: set unwind-on-terminating-exception > PASS: gdb.mi/mi-condbreak-throw.exp: unwind_on_exception=off: insert conditional breakpoint > PASS: gdb.mi/mi-condbreak-throw.exp: unwind_on_exception=off: get number for breakpoint > PASS: gdb.mi/mi-condbreak-throw.exp: unwind_on_exception=off: wait for stop > > === gdb Summary === > > # of expected passes 6 > > Sorry for the delay in testing this one. Not a problem. Thanks for all the testing. I've gone ahead and pushed this series, as this was blocking me from posting the latest version of my inferior function call series[1]. If there's any post-commit feedback, I am always happy to address it. Thanks, Andrew [1] https://inbox.sourceware.org/gdb-patches/cover.1686131880.git.aburgess@redhat.com/