public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: Andrew Burgess <aburgess@redhat.com>
Cc: pedro@palves.net, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] gdb: MI stopped events when unwindonsignal is on
Date: Fri, 18 Aug 2023 18:56:00 -0300	[thread overview]
Message-ID: <874jkwkob3.fsf@linaro.org> (raw)
In-Reply-To: <87350jcb8p.fsf@redhat.com>


Hello Andrew,

Andrew Burgess <aburgess@redhat.com> writes:

> Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:
>
>> Hello Andrew,
>>
>> Andrew Burgess <aburgess@redhat.com> writes:
>>
>>> Thiago Jung Bauermann <thiago.bauermann@linaro.org> 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

  reply	other threads:[~2023-08-18 21:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08 14:45 [PATCH 0/2] Stop notifications " Andrew Burgess
2023-08-08 14:45 ` [PATCH 1/2] gdb/testsuite: add mi_info_frame helper proc (and use it) Andrew Burgess
2023-08-08 14:45 ` [PATCH 2/2] gdb: MI stopped events when unwindonsignal is on Andrew Burgess
2023-08-10 15:06   ` Thiago Jung Bauermann
2023-08-14 14:50     ` Andrew Burgess
2023-08-15  0:32       ` Thiago Jung Bauermann
2023-08-16 14:28         ` Andrew Burgess
2023-08-18 21:56           ` Thiago Jung Bauermann [this message]
2023-08-23  9:33             ` Andrew Burgess
2023-08-29 16:37   ` Simon Marchi
2023-09-08  8:54     ` Andrew Burgess
2023-09-08 10:03     ` Andrew Burgess

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jkwkob3.fsf@linaro.org \
    --to=thiago.bauermann@linaro.org \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).