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] printcmd.c (ui_printf): make internalvar string can be printf and eval when inferior cannot alloc memory


>>>>> ">" == Hui Zhu <teawater@gmail.com> writes:

>> Thanks for your help.
>> I make a new patch according to your mail.

>> 2011-08-14  Hui Zhu  <teawater@gmail.com>
>>        * printcmd.c (ui_printf): Add a handler for internalvar and
>> TYPE_CODE_ARRAY.

I still don't think this is correct.

This special-cases lval_internalvar, but IIUC this will still fail for
something like:

    printf "hi %s\n", "bob"

In this code I don't think you need to call value_as_address for an
array; likewise reading from memory.

The patch also doesn't address the wide-string case, which it should.

Tom


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