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] |
On Wed, Apr 3, 2013 at 2:05 AM, Keith Seitz <keiths@redhat.com> wrote: > On 03/29/2013 12:42 AM, Hui Zhu wrote: > >>>> + breakpoint_re_set_default (b); >>>> + >>>> + if (b->extra_string != NULL) >>>> + update_dprintf_command_list (b); >>>> +} >>>> + >>> >>> >>> >>> This will update the command list every time breakpoints are reset and >>> could >>> be limited to only those needing updating. Is there perhaps a reason to >>> always do this? >> >> >> I think it need, because it need to generate different commands with >> different status for example: >> if (target_can_run_breakpoint_commands ()) >> printf_line = xstrprintf ("agent-printf %s", dprintf_args); >> > > I'm not understanding this example. How is this likely to change whenever > breakpoints are reset? Is there perhaps a way to add a test to demonstrate > this requirement? If the target that GDB connect to is changed (for example, we set dprintf and used it with local host target. Then we changed to use a remote target), GDB need set different commands of dprintfs. The code that I post is from function update_dprintf_command_list. I updated dprintf-pending.exp for this test. > > Otherwise, this patch looks good to me, and recommend that a maintainer give > this a final review. > Thanks for your help. > Keith Best, Hui
Attachment:
dprintf-pending.txt
Description: Text document
Attachment:
dprintf-pending-test.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |