This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] [PR tdep/17379] Fix internal-error when stack pointer is invalid
- From: Pedro Alves <alves dot ped at gmail dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Edjunior Barbosa Machado <emachado at linux dot vnet dot ibm dot com>, gdb-patches at sourceware dot org, Ulrich Weigand <uweigand at de dot ibm dot com>, Sergio Durigan Junior <sergiodj at redhat dot com>
- Date: Fri, 12 Sep 2014 15:21:42 +0100
- Subject: Re: [PATCH] [PR tdep/17379] Fix internal-error when stack pointer is invalid
- Authentication-results: sourceware.org; auth=none
- References: <1410490007-19756-1-git-send-email-emachado at linux dot vnet dot ibm dot com> <5412C3F0 dot 9000703 at redhat dot com> <20140912130051 dot GA4871 at adacore dot com> <5412F714 dot 3040500 at redhat dot com> <20140912135012 dot GC4871 at adacore dot com>
On 09/12/2014 02:50 PM, Joel Brobecker wrote:
>> We still need to use gdb_run_cmd to cover remote testing,
>> so that'd be:
>> gdb_test "" "Program received signal SIGSEGV.*" "run until SIGSEGV"
>> ISTR that gdb_test doesn't allow empty command, but I may well
>> be mistaken. And if it doesn't, maybe it should.
> This is me pretending that I had noticed that the command was empty
> and knowing that this was still OK :-). But once you mentioned it,
> I knew I had already done something like that. See gdb.ada/bp_reset.exp:
> gdb_test "" "Breakpoint $decimal, foo\\.nested_sub \\(\\).*"
> Doing a quick grep, we have a number of occurences where we use
> an empty command when calling gdb_test. And looking at gdb_test's
> implementation, it just passes the first argument to gdb_test_multiple,
> so it should indeed be equivalent. (phew, that was close! ;-)).
I'm writing a test that converts all gdb_run_cmd -> gdb_expect
cases to avoid this from spreading further.