* gdb plugin status?
@ 2008-08-03 17:11 Neo Jia
2008-08-03 17:31 ` Daniel Jacobowitz
0 siblings, 1 reply; 17+ messages in thread
From: Neo Jia @ 2008-08-03 17:11 UTC (permalink / raw)
To: gdb
hi,
I saw some discussions about the gdb plugin supporting around 2007 but
it doesn't show up in the project plan page. Now, I am wondering if
this is on the todo list of the GDB community, or somebody is doing
this already.
I do expect to have a interface to allow developer to load their own
plugin in as a module instead using scripts.
Thanks,
Neo
--
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
2008-08-03 17:11 gdb plugin status? Neo Jia
@ 2008-08-03 17:31 ` Daniel Jacobowitz
2008-08-03 17:43 ` Neo Jia
0 siblings, 1 reply; 17+ messages in thread
From: Daniel Jacobowitz @ 2008-08-03 17:31 UTC (permalink / raw)
To: Neo Jia; +Cc: gdb
On Sun, Aug 03, 2008 at 10:10:52AM -0700, Neo Jia wrote:
> hi,
>
> I saw some discussions about the gdb plugin supporting around 2007 but
> it doesn't show up in the project plan page. Now, I am wondering if
> this is on the todo list of the GDB community, or somebody is doing
> this already.
>
> I do expect to have a interface to allow developer to load their own
> plugin in as a module instead using scripts.
We are adding Python support. If you want to write plugins in some
compiled language, you'll be able to load it and access GDB through
a Python middle-layer. It's in progress (see gdb-patches@).
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
2008-08-03 17:31 ` Daniel Jacobowitz
@ 2008-08-03 17:43 ` Neo Jia
2008-08-03 21:53 ` Thiago Jung Bauermann
0 siblings, 1 reply; 17+ messages in thread
From: Neo Jia @ 2008-08-03 17:43 UTC (permalink / raw)
To: Neo Jia, gdb
On Sun, Aug 3, 2008 at 10:31 AM, Daniel Jacobowitz <drow@false.org> wrote:
> On Sun, Aug 03, 2008 at 10:10:52AM -0700, Neo Jia wrote:
>> hi,
>>
>> I saw some discussions about the gdb plugin supporting around 2007 but
>> it doesn't show up in the project plan page. Now, I am wondering if
>> this is on the todo list of the GDB community, or somebody is doing
>> this already.
>>
>> I do expect to have a interface to allow developer to load their own
>> plugin in as a module instead using scripts.
>
> We are adding Python support. If you want to write plugins in some
> compiled language, you'll be able to load it and access GDB through
> a Python middle-layer. It's in progress (see gdb-patches@).
I am wondering if this is feasible. My plugin will be implemented in C
as it needs to access the hardware. And I should be able to use it
from gdb through the Python middle-layer as Python provides the way to
access .so file.
Am I right?
Thanks,
Neo
>
> --
> Daniel Jacobowitz
> CodeSourcery
>
--
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
2008-08-03 17:43 ` Neo Jia
@ 2008-08-03 21:53 ` Thiago Jung Bauermann
2008-08-03 21:56 ` Thiago Jung Bauermann
0 siblings, 1 reply; 17+ messages in thread
From: Thiago Jung Bauermann @ 2008-08-03 21:53 UTC (permalink / raw)
To: Neo Jia; +Cc: gdb
On Sun, 2008-08-03 at 10:42 -0700, Neo Jia wrote:
> On Sun, Aug 3, 2008 at 10:31 AM, Daniel Jacobowitz <drow@false.org> wrote:
> > We are adding Python support. If you want to write plugins in some
> > compiled language, you'll be able to load it and access GDB through
> > a Python middle-layer. It's in progress (see gdb-patches@).
>
> I am wondering if this is feasible. My plugin will be implemented in C
> as it needs to access the hardware. And I should be able to use it
> from gdb through the Python middle-layer as Python provides the way to
> access .so file.
>
> Am I right?
Yes, it should work.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
2008-08-03 21:53 ` Thiago Jung Bauermann
@ 2008-08-03 21:56 ` Thiago Jung Bauermann
[not found] ` <5d649bdb0808040042o34b759edxe6c11e16588214f6@mail.gmail.com>
0 siblings, 1 reply; 17+ messages in thread
From: Thiago Jung Bauermann @ 2008-08-03 21:56 UTC (permalink / raw)
To: Neo Jia; +Cc: gdb
(Sorry, sent message too early.)
On Sun, 2008-08-03 at 18:52 -0300, Thiago Jung Bauermann wrote:
> On Sun, 2008-08-03 at 10:42 -0700, Neo Jia wrote:
> > I am wondering if this is feasible. My plugin will be implemented in C
> > as it needs to access the hardware. And I should be able to use it
> > from gdb through the Python middle-layer as Python provides the way to
> > access .so file.
> >
> > Am I right?
>
> Yes, it should work.
By the way, if there's any functionality or usecase that you have in
mind which is not described or not covered in
http://sourceware.org/gdb/wiki/PythonGdb
please let us know. We are very interested in input from potential users
of the Python support.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
[not found] ` <5d649bdb0808040042o34b759edxe6c11e16588214f6@mail.gmail.com>
@ 2008-08-04 14:28 ` Thiago Jung Bauermann
2008-08-05 7:33 ` Neo Jia
0 siblings, 1 reply; 17+ messages in thread
From: Thiago Jung Bauermann @ 2008-08-04 14:28 UTC (permalink / raw)
To: Neo Jia; +Cc: gdb ml
On Mon, 2008-08-04 at 00:42 -0700, Neo Jia wrote:
> Could you send me your latest patches? Which version should I apply to?
The latest patches are in the python-patches branch, and apply to HEAD
as of July 15th (I hope they still apply to current HEAD, not sure).
If you prefer to apply the patches instead of just checking out the
python-revisited branch, you can extract each of them with:
$ git log -p -n1 <commit id> > a-python-patch.diff
(I guess I can add this info to the wiki... will do now.)
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
2008-08-04 14:28 ` Thiago Jung Bauermann
@ 2008-08-05 7:33 ` Neo Jia
2008-08-05 13:47 ` Thiago Jung Bauermann
0 siblings, 1 reply; 17+ messages in thread
From: Neo Jia @ 2008-08-05 7:33 UTC (permalink / raw)
To: Thiago Jung Bauermann; +Cc: gdb ml
I try the git repository today but it doesn't build.
Could you take a quick look?
Thanks,
Neo
On Mon, Aug 4, 2008 at 7:27 AM, Thiago Jung Bauermann
<bauerman@br.ibm.com> wrote:
> On Mon, 2008-08-04 at 00:42 -0700, Neo Jia wrote:
>> Could you send me your latest patches? Which version should I apply to?
>
> The latest patches are in the python-patches branch, and apply to HEAD
> as of July 15th (I hope they still apply to current HEAD, not sure).
>
> If you prefer to apply the patches instead of just checking out the
> python-revisited branch, you can extract each of them with:
>
> $ git log -p -n1 <commit id> > a-python-patch.diff
>
> (I guess I can add this info to the wiki... will do now.)
> --
> []'s
> Thiago Jung Bauermann
> IBM Linux Technology Center
>
>
--
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
2008-08-05 7:33 ` Neo Jia
@ 2008-08-05 13:47 ` Thiago Jung Bauermann
[not found] ` <5d649bdb0808051553g6ee22cbfr80cfa43cd56e870c@mail.gmail.com>
0 siblings, 1 reply; 17+ messages in thread
From: Thiago Jung Bauermann @ 2008-08-05 13:47 UTC (permalink / raw)
To: Neo Jia; +Cc: gdb ml
On Tue, 2008-08-05 at 00:33 -0700, Neo Jia wrote:
> I try the git repository today but it doesn't build.
>
> Could you take a quick look?
Indeed, there was a (false) warning about possible use of an unitialized
variable. I fixed the python-revisited branch, but not yet the
python-patches branch.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
[not found] ` <5d649bdb0808051553g6ee22cbfr80cfa43cd56e870c@mail.gmail.com>
@ 2008-08-06 3:27 ` Thiago Jung Bauermann
2008-08-06 4:40 ` Tom Tromey
0 siblings, 1 reply; 17+ messages in thread
From: Thiago Jung Bauermann @ 2008-08-06 3:27 UTC (permalink / raw)
To: Neo Jia; +Cc: gdb ml
On Tue, 2008-08-05 at 15:53 -0700, Neo Jia wrote:
> cc1: warnings being treated as errors
> varobj.c: In function 'update_dynamic_varobj_children':
> varobj.c:932: warning: dereferencing type-punned pointer will break
> strict-aliasing rules
I don't see that error here. I think we are using different versions of
gcc. I'm using 4.3.1.
You can configure with --disable-werror to compile even with warnings.
> BTW, how to pull the changes out? git pull doesn't work for this case?
git pull should work. You can also try:
$ git pull origin python-revisited:python-revisited
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
2008-08-06 3:27 ` Thiago Jung Bauermann
@ 2008-08-06 4:40 ` Tom Tromey
2008-08-06 5:44 ` Thiago Jung Bauermann
0 siblings, 1 reply; 17+ messages in thread
From: Tom Tromey @ 2008-08-06 4:40 UTC (permalink / raw)
To: Thiago Jung Bauermann; +Cc: Neo Jia, gdb ml
>>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:
>> On Tue, 2008-08-05 at 15:53 -0700, Neo Jia wrote:
>> cc1: warnings being treated as errors
>> varobj.c: In function 'update_dynamic_varobj_children':
>> varobj.c:932: warning: dereferencing type-punned pointer will break
>> strict-aliasing rules
Thiago> I don't see that error here. I think we are using different versions of
Thiago> gcc. I'm using 4.3.1.
FWIW, my build uses -fno-strict-aliasing, which disables this warning.
I think this comes from python-config.
Tom
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
2008-08-06 4:40 ` Tom Tromey
@ 2008-08-06 5:44 ` Thiago Jung Bauermann
2008-08-06 20:37 ` Tom Tromey
0 siblings, 1 reply; 17+ messages in thread
From: Thiago Jung Bauermann @ 2008-08-06 5:44 UTC (permalink / raw)
To: tromey; +Cc: Neo Jia, gdb ml
On Tue, 2008-08-05 at 22:39 -0600, Tom Tromey wrote:
> >>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:
> >> On Tue, 2008-08-05 at 15:53 -0700, Neo Jia wrote:
> >> cc1: warnings being treated as errors
> >> varobj.c: In function 'update_dynamic_varobj_children':
> >> varobj.c:932: warning: dereferencing type-punned pointer will break
> >> strict-aliasing rules
>
> Thiago> I don't see that error here. I think we are using different versions of
> Thiago> gcc. I'm using 4.3.1.
>
> FWIW, my build uses -fno-strict-aliasing, which disables this warning.
> I think this comes from python-config.
It's more accurate to say that its use was inspired by python-config,
since we don't actually call the utility. :-)
Anyway, the PYTHON_CFLAGS are only used to compile files under the
python/ subdir. I just checked here and varobj.c isn't compiled with it.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
2008-08-06 5:44 ` Thiago Jung Bauermann
@ 2008-08-06 20:37 ` Tom Tromey
2008-08-06 20:46 ` Thiago Jung Bauermann
0 siblings, 1 reply; 17+ messages in thread
From: Tom Tromey @ 2008-08-06 20:37 UTC (permalink / raw)
To: Thiago Jung Bauermann; +Cc: Neo Jia, gdb ml
>>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:
Tom> FWIW, my build uses -fno-strict-aliasing, which disables this warning.
Thiago> Anyway, the PYTHON_CFLAGS are only used to compile files under the
Thiago> python/ subdir. I just checked here and varobj.c isn't compiled with it.
I suppose we should widen this to any file that includes python-internal.h.
Or, rework things so that varobj.c does not have to include that file.
Given that these flags that are needed by python headers are basically
bug workarounds, it might be nice to try to limit the fallout.
Tom
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
2008-08-06 20:37 ` Tom Tromey
@ 2008-08-06 20:46 ` Thiago Jung Bauermann
2008-08-07 7:11 ` Neo Jia
0 siblings, 1 reply; 17+ messages in thread
From: Thiago Jung Bauermann @ 2008-08-06 20:46 UTC (permalink / raw)
To: Tom Tromey; +Cc: Neo Jia, gdb ml
On Wed, 2008-08-06 at 14:36 -0600, Tom Tromey wrote:
> >>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:
>
> Tom> FWIW, my build uses -fno-strict-aliasing, which disables this warning.
>
> Thiago> Anyway, the PYTHON_CFLAGS are only used to compile files under the
> Thiago> python/ subdir. I just checked here and varobj.c isn't compiled with it.
>
> I suppose we should widen this to any file that includes python-internal.h.
>
> Or, rework things so that varobj.c does not have to include that file.
> Given that these flags that are needed by python headers are basically
> bug workarounds, it might be nice to try to limit the fallout.
Right, nothing outside python/ is supposed to include python-internal.h
(that's why I put the -internal suffix :-) ). varobj.c does it at the
moment because we didn't get around to cleanup the MI python patch yet.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
2008-08-06 20:46 ` Thiago Jung Bauermann
@ 2008-08-07 7:11 ` Neo Jia
2008-08-07 18:37 ` Tom Tromey
0 siblings, 1 reply; 17+ messages in thread
From: Neo Jia @ 2008-08-07 7:11 UTC (permalink / raw)
To: Thiago Jung Bauermann; +Cc: Tom Tromey, gdb ml
On Wed, Aug 6, 2008 at 1:43 PM, Thiago Jung Bauermann
<bauerman@br.ibm.com> wrote:
> On Wed, 2008-08-06 at 14:36 -0600, Tom Tromey wrote:
>> >>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:
>>
>> Tom> FWIW, my build uses -fno-strict-aliasing, which disables this warning.
>>
>> Thiago> Anyway, the PYTHON_CFLAGS are only used to compile files under the
>> Thiago> python/ subdir. I just checked here and varobj.c isn't compiled with it.
>>
>> I suppose we should widen this to any file that includes python-internal.h.
>>
>> Or, rework things so that varobj.c does not have to include that file.
>> Given that these flags that are needed by python headers are basically
>> bug workarounds, it might be nice to try to limit the fallout.
>
> Right, nothing outside python/ is supposed to include python-internal.h
> (that's why I put the -internal suffix :-) ). varobj.c does it at the
> moment because we didn't get around to cleanup the MI python patch yet.
I just build it. Is there any example to use this plugin? Can I source
in a python script?
BTW, would it be better to change the python prompt to ">>>"?
Thanks,
Neo
> --
> []'s
> Thiago Jung Bauermann
> IBM Linux Technology Center
>
>
--
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
2008-08-07 7:11 ` Neo Jia
@ 2008-08-07 18:37 ` Tom Tromey
2008-08-07 19:06 ` Thiago Jung Bauermann
0 siblings, 1 reply; 17+ messages in thread
From: Tom Tromey @ 2008-08-07 18:37 UTC (permalink / raw)
To: Neo Jia; +Cc: Thiago Jung Bauermann, gdb ml
>>>>> "Neo" == Neo Jia <neojia@gmail.com> writes:
Neo> I just build it. Is there any example to use this plugin? Can I source
Neo> in a python script?
There are a couple examples in the gdb or gdb-patches list archives.
Here's one I happen to have right away:
http://sourceware.org/ml/gdb/2008-03/msg00201.html
We do need more examples, and a standard library of scripts.
Neo> BTW, would it be better to change the python prompt to ">>>"?
You mean when entering a multi-line 'python' script?
Either way is fine by me.
Tom
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
2008-08-07 18:37 ` Tom Tromey
@ 2008-08-07 19:06 ` Thiago Jung Bauermann
2008-08-12 15:25 ` Thiago Jung Bauermann
0 siblings, 1 reply; 17+ messages in thread
From: Thiago Jung Bauermann @ 2008-08-07 19:06 UTC (permalink / raw)
To: Tom Tromey; +Cc: Neo Jia, gdb ml
On Thu, 2008-08-07 at 12:36 -0600, Tom Tromey wrote:
> >>>>> "Neo" == Neo Jia <neojia@gmail.com> writes:
>
> Neo> I just build it. Is there any example to use this plugin? Can I source
> Neo> in a python script?
>
> There are a couple examples in the gdb or gdb-patches list archives.
> Here's one I happen to have right away:
>
> http://sourceware.org/ml/gdb/2008-03/msg00201.html
>
> We do need more examples, and a standard library of scripts.
>
> Neo> BTW, would it be better to change the python prompt to ">>>"?
>
> You mean when entering a multi-line 'python' script?
> Either way is fine by me.
That script is a little bit outdated in two ways:
1. Some of the gdb.Frame methods had slight name changes since then;
2. The kludge it uses to create a gdb command tied to a python script is
not necessary anymore, there's a proper command interface now.
But it's a good starting point nevertheless.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: gdb plugin status?
2008-08-07 19:06 ` Thiago Jung Bauermann
@ 2008-08-12 15:25 ` Thiago Jung Bauermann
0 siblings, 0 replies; 17+ messages in thread
From: Thiago Jung Bauermann @ 2008-08-12 15:25 UTC (permalink / raw)
To: Tom Tromey; +Cc: Neo Jia, gdb ml
On Thu, 2008-08-07 at 16:03 -0300, Thiago Jung Bauermann wrote:
> > There are a couple examples in the gdb or gdb-patches list archives.
> > Here's one I happen to have right away:
> >
> > http://sourceware.org/ml/gdb/2008-03/msg00201.html
>
> That script is a little bit outdated in two ways:
>
> 1. Some of the gdb.Frame methods had slight name changes since then;
> 2. The kludge it uses to create a gdb command tied to a python script is
> not necessary anymore, there's a proper command interface now.
>
> But it's a good starting point nevertheless.
I just fixed the two issues above, and made the updated script available
in the GDB wiki:
http://sourceware.org/gdb/wiki/PythonGdb
Also, a couple of fixes needed to be made in the code, so you need to
update your python-revisited branch.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2008-08-10 21:02 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-03 17:11 gdb plugin status? Neo Jia
2008-08-03 17:31 ` Daniel Jacobowitz
2008-08-03 17:43 ` Neo Jia
2008-08-03 21:53 ` Thiago Jung Bauermann
2008-08-03 21:56 ` Thiago Jung Bauermann
[not found] ` <5d649bdb0808040042o34b759edxe6c11e16588214f6@mail.gmail.com>
2008-08-04 14:28 ` Thiago Jung Bauermann
2008-08-05 7:33 ` Neo Jia
2008-08-05 13:47 ` Thiago Jung Bauermann
[not found] ` <5d649bdb0808051553g6ee22cbfr80cfa43cd56e870c@mail.gmail.com>
2008-08-06 3:27 ` Thiago Jung Bauermann
2008-08-06 4:40 ` Tom Tromey
2008-08-06 5:44 ` Thiago Jung Bauermann
2008-08-06 20:37 ` Tom Tromey
2008-08-06 20:46 ` Thiago Jung Bauermann
2008-08-07 7:11 ` Neo Jia
2008-08-07 18:37 ` Tom Tromey
2008-08-07 19:06 ` Thiago Jung Bauermann
2008-08-12 15:25 ` Thiago Jung Bauermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox