This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix spurious FAILs with examine-backward.exp


On Mon, Mar 20 2017, Pedro Alves wrote:

> On 03/20/2017 05:14 PM, Andreas Arnez wrote:
>> The test case examine-backward.exp issues the command "x/-s" after the end
>> of the first string in TestStrings, but without making sure that this
>> string is preceded by a string terminator.  Thus GDB may spuriously print
>> some random characters from before that string, and then the test fails.
>> 
>> This patch assures that TestStrings is preceded by a string terminator.
>> 
>
> Agreed.  Looks like I forgot to follow through with:
>
>  https://sourceware.org/ml/gdb-patches/2016-08/msg00127.html

Heh, and you even expressed exactly the same thought I had about this:

  "It's not strictly correct to assume that the linker places the
  objects consecutively, but it's probably safe in practice."

>
>>  
>> +const char Barrier[] = {
>> +  0x00,
>> +};
>> +
>
> OK with a comment.  Feel free to steal mine from that url.

Sure  :-)

Pushed with that change.

Thanks,
Andreas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]