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: [RFC] Let "gcore" command accept a suffix argument


On Thu, Jun 24, 2010 at 00:59, Joel Brobecker <brobecker@adacore.com> wrote:
>> 2010-06-23 ?Hui Zhu ?<teawater@gmail.com>
>>
>> ? ? ? ?* printcmd.c (ui_printf): New function.
>> ? ? ? ?(printf_command): Call ui_printf.
>> ? ? ? ?(_initialize_printcmd): New command "eval".
>
> This is OK.
>
>> 2010-06-23 ?Hui Zhu ?<teawater@gmail.com>
>>
>> ? ? ? * gdb.base/eval.exp: New file.
>
> This is also OK. ?Just for the record, I first thought that your two
> tests where still the same and thus would generate the same message.
> But after a closer inspection, one used $a++ and the other ++$a.
> Why not use something more different like '$a * 2' maybe?
>
> Another way to make things different is to specify distinct messages
> explicitly - for instance "first eval" / "second eval"...
>

Thanks Joel, Changed it to:
gdb_test "eval \"echo %d\\n\", \$a++" "10" "First eval."
gdb_test "eval \"echo %d\\n\", \$a*2" "22" "Second eval."

And checked in.

Best,
Hui


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