* [DIscussion] some thought about call a editor set the commands of breakpoints and tracepoints
@ 2013-03-08 16:17 Hui Zhu
2013-03-15 15:39 ` Tom Tromey
2013-03-18 2:25 ` Yao Qi
0 siblings, 2 replies; 6+ messages in thread
From: Hui Zhu @ 2013-03-08 16:17 UTC (permalink / raw)
To: gdb
Hi,
I think a lot of people had gotten a problem is when you want change
the commands of breakpoints or tracepoints when the commands is
complicated. For example, maybe you just want to change one or two
lines inside the commands, you need re-input all of them. And if you
input something wrong, then all of commands that you input in before
will be droped.
Of course, you can use "save tracepoint xxx" "!vim xxx" "source xxx"
handle it. But it is still cumbersome.
So I thought why not let gdb call a editor set the commands of
breakpoints and tracepoints?
For example:
commands -e 1
Then editor come out, the original commands of 1 is inside there. You
can just change some lines in there to change the commands.
What do you think about it? Any comments is always welcome.
Thanks,
Hui
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [DIscussion] some thought about call a editor set the commands of breakpoints and tracepoints
2013-03-08 16:17 [DIscussion] some thought about call a editor set the commands of breakpoints and tracepoints Hui Zhu
@ 2013-03-15 15:39 ` Tom Tromey
2013-03-15 15:55 ` Hui Zhu
2013-03-18 2:25 ` Yao Qi
1 sibling, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2013-03-15 15:39 UTC (permalink / raw)
To: Hui Zhu; +Cc: gdb
>>>>> "Hui" == Hui Zhu <teawater@gmail.com> writes:
Hui> So I thought why not let gdb call a editor set the commands of
Hui> breakpoints and tracepoints?
Hui> For example:
Hui> commands -e 1
Hui> Then editor come out, the original commands of 1 is inside there. You
Hui> can just change some lines in there to change the commands.
Hui> What do you think about it? Any comments is always welcome.
I think it would be a good idea.
Actually I vaguely recall that there was a patch for this before.
Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [DIscussion] some thought about call a editor set the commands of breakpoints and tracepoints
2013-03-15 15:39 ` Tom Tromey
@ 2013-03-15 15:55 ` Hui Zhu
2013-03-15 18:27 ` Tom Tromey
0 siblings, 1 reply; 6+ messages in thread
From: Hui Zhu @ 2013-03-15 15:55 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb
On Fri, Mar 15, 2013 at 11:39 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Hui" == Hui Zhu <teawater@gmail.com> writes:
>
> Hui> So I thought why not let gdb call a editor set the commands of
> Hui> breakpoints and tracepoints?
> Hui> For example:
> Hui> commands -e 1
> Hui> Then editor come out, the original commands of 1 is inside there. You
> Hui> can just change some lines in there to change the commands.
>
> Hui> What do you think about it? Any comments is always welcome.
>
> I think it would be a good idea.
> Actually I vaguely recall that there was a patch for this before.
>
> Tom
Hi Tom,
Do you have a url or title of this patch to make me can find this patch?
Thanks,
Hui
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [DIscussion] some thought about call a editor set the commands of breakpoints and tracepoints
2013-03-15 15:55 ` Hui Zhu
@ 2013-03-15 18:27 ` Tom Tromey
0 siblings, 0 replies; 6+ messages in thread
From: Tom Tromey @ 2013-03-15 18:27 UTC (permalink / raw)
To: Hui Zhu; +Cc: gdb
Hui> Do you have a url or title of this patch to make me can find this patch?
Nope, I'm afraid not.
I wouldn't bother with it though.
If it is complicated enough, we'll have to go through all the paperwork
stuff, so your feature will be delayed. And if it is trivial, probably
not worth the time spent searching :)
Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [DIscussion] some thought about call a editor set the commands of breakpoints and tracepoints
2013-03-08 16:17 [DIscussion] some thought about call a editor set the commands of breakpoints and tracepoints Hui Zhu
2013-03-15 15:39 ` Tom Tromey
@ 2013-03-18 2:25 ` Yao Qi
2013-03-18 9:33 ` Hui Zhu
1 sibling, 1 reply; 6+ messages in thread
From: Yao Qi @ 2013-03-18 2:25 UTC (permalink / raw)
To: Hui Zhu; +Cc: gdb
On 03/09/2013 12:16 AM, Hui Zhu wrote:
> So I thought why not let gdb call a editor set the commands of
> breakpoints and tracepoints?
> For example:
> commands -e 1
> Then editor come out, the original commands of 1 is inside there. You
> can just change some lines in there to change the commands.
FWIW, GDB already has a command 'edit' which is to invoke editor to edit
source file http://sourceware.org/gdb/current/onlinedocs/gdb/Edit.html
It may be extended to edit breakpoint commands.
--
Yao (é½å°§)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [DIscussion] some thought about call a editor set the commands of breakpoints and tracepoints
2013-03-18 2:25 ` Yao Qi
@ 2013-03-18 9:33 ` Hui Zhu
0 siblings, 0 replies; 6+ messages in thread
From: Hui Zhu @ 2013-03-18 9:33 UTC (permalink / raw)
To: Yao Qi, Hui Zhu; +Cc: gdb
On 03/18/13 10:24, Yao Qi wrote:
> On 03/09/2013 12:16 AM, Hui Zhu wrote:
>> So I thought why not let gdb call a editor set the commands of
>> breakpoints and tracepoints?
>> For example:
>> commands -e 1
>> Then editor come out, the original commands of 1 is inside there. You
>> can just change some lines in there to change the commands.
>
> FWIW, GDB already has a command 'edit' which is to invoke editor to edit source file http://sourceware.org/gdb/current/onlinedocs/gdb/Edit.html
>
> It may be extended to edit breakpoint commands.
>
I am not sure about that. This "source" is the "source" of the code. Not the "source" command of GDB. I'm afraid it will confuse the user.
Thanks,
Hui
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-18 9:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-08 16:17 [DIscussion] some thought about call a editor set the commands of breakpoints and tracepoints Hui Zhu
2013-03-15 15:39 ` Tom Tromey
2013-03-15 15:55 ` Hui Zhu
2013-03-15 18:27 ` Tom Tromey
2013-03-18 2:25 ` Yao Qi
2013-03-18 9:33 ` Hui Zhu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox