From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by sourceware.org (Postfix) with ESMTPS id 5403E3858D32 for ; Fri, 18 Aug 2023 21:56:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5403E3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-1c4c5375329so823984fac.2 for ; Fri, 18 Aug 2023 14:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692395763; x=1693000563; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=Sk3vhT95OFX8oYXmKSm2JQrZhYekDLLca8vdLIo5UF0=; b=XUCx9sQUyir+oTajdn7L6mdOShgxIwFyasa9pNSRduv0fCa+qIRD+W34khp4xwrmmz ZSec0cJFWqePs8Hha0iIvfbMF2naYrRSAaTBoYo7oqnSzkEhl6zy0cKmQug3THKCPLzl colgO7SR5deOgc5NLOonh8nHPUJp/AHtIO76D1zkF7tssOXAEw8IYzTCIMR5AvL1gmw6 O5HeuEA5A6WyXhTsbeTefwR1rptf8E8htDa3iobrmY1PofOZkwd5lANG9RXwsX8Wmwev zTLqZU22pAowN5Etl43SKwD6U544Os80IeM7abzxKNGTC0pS+gmp+X385c+co8gXUVvX PraA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692395763; x=1693000563; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Sk3vhT95OFX8oYXmKSm2JQrZhYekDLLca8vdLIo5UF0=; b=ML0h7Bf5amrDOgFp4B07VKuUY3LRmingLVUHwFRH63OX2RFd8HIP4TPk+/7tTFmCgm pZJDX0kqptJ9Qd5W0GKs17luyRJaNpsGWs2gDWxNbrR3MktVeEr/iUcd1CpkzZW7JvHB z1hn5TBGrpDPy+jq10m5lq114CuqPuerLJJq7GPSCK+PopTUrtA44QdSfQS804SaQ5kU 4oUWQ1p78mQNozJNpuGqtcBepJrWobhUOkpT+ikjfORN2P4uosspUJHUfm/CDTJIQAIb 7rYVNLHGWfYAPRYvt0OewYcH7O8xe/8oHHevwYQ4QK2bYfAMmaPl2455EJ6EqE30NrzK 4YSw== X-Gm-Message-State: AOJu0YythuvatxaTVZtkVd+NygvQLaGr4YHG8m0XNIw68QamGReSdmaj M7PTKcU36ookXbfTUG5eUFLkzFDdUVRkY1A63gQ= X-Google-Smtp-Source: AGHT+IFC2Sax3ppD02XcNBxx67qeLwze94Fl7HMMwBmKT75/L6OF8X4ZYVP7MUaYdmcUyVsmSvRU0A== X-Received: by 2002:a05:6871:68e:b0:1bf:ec67:f2c6 with SMTP id l14-20020a056871068e00b001bfec67f2c6mr567245oao.17.1692395763625; Fri, 18 Aug 2023 14:56:03 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:80dc:7e47:4373:7fd8]) by smtp.gmail.com with ESMTPSA id v2-20020a056870e28200b001b3d67934e9sm1492985oad.26.2023.08.18.14.56.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Aug 2023 14:56:03 -0700 (PDT) References: <87v8dnq6mh.fsf@linaro.org> <87edk5d6f3.fsf@redhat.com> <87v8dhp2lu.fsf@linaro.org> <87350jcb8p.fsf@redhat.com> User-agent: mu4e 1.10.5; emacs 28.2 From: Thiago Jung Bauermann To: Andrew Burgess Cc: pedro@palves.net, gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] gdb: MI stopped events when unwindonsignal is on In-reply-to: <87350jcb8p.fsf@redhat.com> Date: Fri, 18 Aug 2023 18:56:00 -0300 Message-ID: <874jkwkob3.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: 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. -- Thiago