From: Luis Machado <lgustavo@codesourcery.com>
To: Pedro Alves <palves@redhat.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Make gdb.python/python.exp more robust
Date: Fri, 20 Jan 2017 19:17:00 -0000 [thread overview]
Message-ID: <fcb67107-e1c8-2445-d006-f8fe2ea1c64b@codesourcery.com> (raw)
In-Reply-To: <2899cd10-7498-6b56-c53b-f2eb1f87e5fa@redhat.com>
On 01/20/2017 10:59 AM, Pedro Alves wrote:
> On 01/20/2017 02:37 PM, Luis Machado wrote:
>
>> }
>> gdb_test "python print (symtab\[1\]\[0\].symtab)" ".*${python_1_c}" "test decode_line func1 filename"
>> -gdb_test "python print (symtab\[1\]\[0\].line)" "19" "test decode_line func1 line number"
>> +
>> +# Fetch the line GDB thinks func1 starts at. This may change depending
>> +# on the architecture and on how GDB handles the prologue of the function.
>> +gdb_test_multiple "info line func1" "info line func1" {
>> + -re "Line ($decimal) of .* starts at address $hex <func1> and ends at $hex <func1\\+$decimal>\.\[\r\n\]+$gdb_prompt $" {
>> + # Fetch the line number.
>> + set func1_lineno $expect_out(1,string)
>> + }
>> +}
>
> Do:
>
> set func1_lineno "noline"
>
Indeed.
> before gdb_test_multiple, so that in case the above FAILs, this:
>
>> +
>> +gdb_test "python print (symtab\[1\]\[0\].line)" "$func1_lineno" "test decode_line func1 line number"
>
> FAILs too, instead of ERRORing out with a TCL error, due to
> undefined $func1_lineno.
>
> OK with that change.
>
> Thanks,
> Pedro Alves
>
>
Fixed and pushed as d334ae250a3ec888f0603cf8e909d0f425aeb30f.
Thanks,
Luis
prev parent reply other threads:[~2017-01-20 19:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-20 14:37 Luis Machado
2017-01-20 16:59 ` Pedro Alves
2017-01-20 19:17 ` Luis Machado [this message]
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=fcb67107-e1c8-2445-d006-f8fe2ea1c64b@codesourcery.com \
--to=lgustavo@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/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