This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] Implement the ability to set/unset environment variables to GDBserver when starting the inferior
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: GDB Patches <gdb-patches at sourceware dot org>, Pedro Alves <palves at redhat dot com>, Eli Zaretskii <eliz at gnu dot org>
- Date: Sat, 12 Aug 2017 00:19:35 -0400
- Subject: Re: [PATCH v2] Implement the ability to set/unset environment variables to GDBserver when starting the inferior
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=sergiodj at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6DC6EC29B5FA
- References: <20170629194106.23070-1-sergiodj@redhat.com> <20170727033531.23066-1-sergiodj@redhat.com> <256083325d9f9c4cc4f5518fe6e5292d@polymtl.ca>
On Monday, August 07 2017, Simon Marchi wrote:
> On 2017-07-27 05:35, Sergio Durigan Junior wrote:
>> +# Helper function to re-run to main and breaking at the "break-here"
>> +# label.
>> +
>> +proc rerun_to_main { } {
>> + global decimal hex
>> +
>> + if { ![runto_main] } {
>> + return -1
>> + }
>> +
>> + gdb_breakpoint [gdb_get_line_number "break-here"]
>> +
>> + gdb_test "continue" "Breakpoint $decimal, main \\\(argc=1,
>> argv=$hex\\\) at.*" \
>> + "continue until breakpoint"
>> +}
>
> Hi Sergio,
Hey Simon,
I'm back from vacation, sorry about the delay in replying these
messages.
> I just noticed something out of pure coincidence. I noticed some TCL
> backtraces when running the testsuite that I hadn't seen before, such
> as:
>
> ERROR: tcl error sourcing
> /home/emaisin/src/binutils-gdb/gdb/testsuite/gdb.base/sigbpt.exp.
> ERROR: undefined tag "break-here"
> while executing
> "error "undefined tag \"$text\"""
> (procedure "gdb_get_line_number" line 36)
> invoked from within
> "gdb_get_line_number "break-here""
> (procedure "rerun_to_main" line 8)
> invoked from within
> "rerun_to_main"
> (procedure "stepi_out" line 10)
> invoked from within
> "stepi_out "stepi""
> (file
> "/home/emaisin/src/binutils-gdb/gdb/testsuite/gdb.base/sigbpt.exp"
> line 256)
> invoked from within
> "source
> /home/emaisin/src/binutils-gdb/gdb/testsuite/gdb.base/sigbpt.exp"
> ("uplevel" body line 1)
> invoked from within
> "uplevel #0 source
> /home/emaisin/src/binutils-gdb/gdb/testsuite/gdb.base/sigbpt.exp"
> invoked from within
> "catch "uplevel #0 source $test_file_name""
>
> It turns out I had your test file (share-env-with-gdbserver.exp) still
> lying around in my repo. The procedure defined above (rerun_to_main)
> overrides one with the same name defined in lib/gdb.exp, breaking the
> tests executed after, that use this proc.
Ops. I'll redefine the proc and use another name. Thanks for catching
that.
Cheers,
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/