* Re: Some Python ideas, looking for feedback [not found] ` <20110817193710.59945561@ado-gentoo> @ 2011-08-17 19:13 ` Andrew Oakley 2011-08-17 19:29 ` Eli Zaretskii ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Andrew Oakley @ 2011-08-17 19:13 UTC (permalink / raw) To: gdb-patches; +Cc: gdb On Wed, 17 Aug 2011 19:37:10 +0100 Andrew Oakley <andrew@ado.is-a-geek.net> wrote: > What you are looking for is (for some reason) stored in bitpos. I > can't actually find any documentation for this :(. Perhaps we should fix that: Document gdb.Value field attribute "bitpos" for enums. --- diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 6e7bf52..c82173b 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -21575,7 +21575,8 @@ Each field is an object, with some pre-defined attributes: @item bitpos This attribute is not available for @code{static} fields (as in C@t{++} or Java). For non-@code{static} fields, the value is the bit -position of the field. +position of the field. For @code{enum} fields, the value is the enumeration +member's integer representation. @item name The name of the field, or @code{None} for anonymous fields. -- Andrew Oakley ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Some Python ideas, looking for feedback 2011-08-17 19:13 ` Some Python ideas, looking for feedback Andrew Oakley @ 2011-08-17 19:29 ` Eli Zaretskii 2011-08-17 19:35 ` Andrew Oakley 2011-08-17 20:52 ` Daniel Jacobowitz [not found] ` <CAN9gPaFPhVYmfUO0sZeMUUy0X7x+hyUd8wDFJZXbe98RVvTLSw__33957.6404345737$1313614343$gmane$org@mail.gmail.com> 2 siblings, 1 reply; 13+ messages in thread From: Eli Zaretskii @ 2011-08-17 19:29 UTC (permalink / raw) To: Andrew Oakley; +Cc: gdb-patches, gdb > Date: Wed, 17 Aug 2011 20:13:16 +0100 > From: Andrew Oakley <andrew@ado.is-a-geek.net> > Cc: <gdb@sourceware.org> > > -position of the field. > +position of the field. For @code{enum} fields, the value is the > enumeration +member's integer representation. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I don't understand this part. Can you elaborate, please? In particular, what does that `+' stand for? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Some Python ideas, looking for feedback 2011-08-17 19:29 ` Eli Zaretskii @ 2011-08-17 19:35 ` Andrew Oakley 2011-08-17 20:38 ` Eli Zaretskii 0 siblings, 1 reply; 13+ messages in thread From: Andrew Oakley @ 2011-08-17 19:35 UTC (permalink / raw) To: gdb; +Cc: Eli Zaretskii, gdb-patches On Wed, 17 Aug 2011 22:29:40 +0300 Eli Zaretskii <eliz@gnu.org> wrote: > > Date: Wed, 17 Aug 2011 20:13:16 +0100 > > From: Andrew Oakley <andrew@ado.is-a-geek.net> > > Cc: <gdb@sourceware.org> > > > > -position of the field. > > +position of the field. For @code{enum} fields, the value is the > > enumeration +member's integer representation. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > I don't understand this part. Can you elaborate, please? In > particular, what does that `+' stand for? Oops. That's a broken copy + paste into a email compose window. I should have used git send-email so that didn't happen :(. "Fixed" version: diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 6e7bf52..c82173b 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -21575,7 +21575,8 @@ Each field is an object, with some pre-defined attributes: @item bitpos This attribute is not available for @code{static} fields (as in C@t{++} or Java). For non-@code{static} fields, the value is the bit -position of the field. +position of the field. For @code{enum} fields, the value is the +enumeration member's integer representation. @item name The name of the field, or @code{None} for anonymous fields. -- Andrew Oakley ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Some Python ideas, looking for feedback 2011-08-17 19:35 ` Andrew Oakley @ 2011-08-17 20:38 ` Eli Zaretskii 0 siblings, 0 replies; 13+ messages in thread From: Eli Zaretskii @ 2011-08-17 20:38 UTC (permalink / raw) To: Andrew Oakley; +Cc: gdb, gdb-patches > Date: Wed, 17 Aug 2011 20:35:25 +0100 > From: Andrew Oakley <andrew@ado.is-a-geek.net> > Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org > > "Fixed" version: > > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index 6e7bf52..c82173b 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -21575,7 +21575,8 @@ Each field is an object, with some pre-defined > attributes: @item bitpos > This attribute is not available for @code{static} fields (as in > C@t{++} or Java). For non-@code{static} fields, the value is the bit > -position of the field. > +position of the field. For @code{enum} fields, the value is the > +enumeration member's integer representation. This version is fine, thanks. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Some Python ideas, looking for feedback 2011-08-17 19:13 ` Some Python ideas, looking for feedback Andrew Oakley 2011-08-17 19:29 ` Eli Zaretskii @ 2011-08-17 20:52 ` Daniel Jacobowitz 2011-08-17 21:15 ` Paul_Koning [not found] ` <CAN9gPaFPhVYmfUO0sZeMUUy0X7x+hyUd8wDFJZXbe98RVvTLSw__33957.6404345737$1313614343$gmane$org@mail.gmail.com> 2 siblings, 1 reply; 13+ messages in thread From: Daniel Jacobowitz @ 2011-08-17 20:52 UTC (permalink / raw) To: Andrew Oakley; +Cc: gdb-patches, gdb On Wed, Aug 17, 2011 at 3:13 PM, Andrew Oakley <andrew@ado.is-a-geek.net> wrote: > On Wed, 17 Aug 2011 19:37:10 +0100 > Andrew Oakley <andrew@ado.is-a-geek.net> wrote: >> What you are looking for is (for some reason) stored in bitpos. I >> can't actually find any documentation for this :(. > > Perhaps we should fix that: > > Document gdb.Value field attribute "bitpos" for enums. I don't suppose we can avoid exposing this internal C wart to Python, and expose it some other way... ? -- Thanks, Daniel ^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: Some Python ideas, looking for feedback 2011-08-17 20:52 ` Daniel Jacobowitz @ 2011-08-17 21:15 ` Paul_Koning 2011-08-19 14:14 ` Tom Tromey 0 siblings, 1 reply; 13+ messages in thread From: Paul_Koning @ 2011-08-17 21:15 UTC (permalink / raw) To: drow, andrew; +Cc: gdb-patches, gdb >> On Wed, 17 Aug 2011 19:37:10 +0100 >> Andrew Oakley <andrew@ado.is-a-geek.net> wrote: >>> What you are looking for is (for some reason) stored in bitpos. I >>> can't actually find any documentation for this :(. >> >> Perhaps we should fix that: >> >> Document gdb.Value field attribute "bitpos" for enums. > >I don't suppose we can avoid exposing this internal C wart to Python, and expose it some other way... ? Clearly we could. For example, André suggested using the int() function on the field object, by analogy to what int() does to an enum-valued Value object. That certainly would make sense and it would be a pretty natural Pythonic thing to do. paul ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Some Python ideas, looking for feedback 2011-08-17 21:15 ` Paul_Koning @ 2011-08-19 14:14 ` Tom Tromey 0 siblings, 0 replies; 13+ messages in thread From: Tom Tromey @ 2011-08-19 14:14 UTC (permalink / raw) To: Paul_Koning; +Cc: drow, andrew, gdb-patches, gdb >>>>> "Paul" == <Paul_Koning@Dell.com> writes: Paul> Clearly we could. For example, André suggested using the int() Paul> function on the field object, by analogy to what int() does to an Paul> enum-valued Value object. That certainly would make sense and it Paul> would be a pretty natural Pythonic thing to do. Sounds good to me. Tom ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <CAN9gPaFPhVYmfUO0sZeMUUy0X7x+hyUd8wDFJZXbe98RVvTLSw__33957.6404345737$1313614343$gmane$org@mail.gmail.com>]
* Re: Some Python ideas, looking for feedback [not found] ` <CAN9gPaFPhVYmfUO0sZeMUUy0X7x+hyUd8wDFJZXbe98RVvTLSw__33957.6404345737$1313614343$gmane$org@mail.gmail.com> @ 2011-08-19 14:14 ` Tom Tromey 2011-08-24 9:48 ` Andrew Oakley 0 siblings, 1 reply; 13+ messages in thread From: Tom Tromey @ 2011-08-19 14:14 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: Andrew Oakley, gdb-patches, gdb >>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes: Daniel> I don't suppose we can avoid exposing this internal C wart to Python, Daniel> and expose it some other way... ? I think it depends on whether we have shipped it or not. If we have, then perhaps someone is using it; in that case I would rather not break it. However, even in that case, we can still add a new attribute with a better name and recommend that people use it. Tom ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Some Python ideas, looking for feedback 2011-08-19 14:14 ` Tom Tromey @ 2011-08-24 9:48 ` Andrew Oakley 2011-08-24 11:42 ` Phil Muldoon [not found] ` <m3aaazavdq.fsf__47025.4836873666$1314186175$gmane$org@redhat.com> 0 siblings, 2 replies; 13+ messages in thread From: Andrew Oakley @ 2011-08-24 9:48 UTC (permalink / raw) To: Tom Tromey; +Cc: Daniel Jacobowitz, gdb-patches, gdb On 19/08/11 15:13, Tom Tromey wrote: >>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes: > > Daniel> I don't suppose we can avoid exposing this internal C wart to Python, > Daniel> and expose it some other way... ? > > I think it depends on whether we have shipped it or not. > If we have, then perhaps someone is using it; in that case I would > rather not break it. Yes, you've shipped it. At least one person is using it (me). I'd prefer it if this didn't go away. > However, even in that case, we can still add a new attribute with a > better name and recommend that people use it. Thats fair enough, but for now can we please get the documentation updated? -- Andrew Oakley ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Some Python ideas, looking for feedback 2011-08-24 9:48 ` Andrew Oakley @ 2011-08-24 11:42 ` Phil Muldoon 2011-08-24 11:46 ` Andrew Oakley [not found] ` <m3aaazavdq.fsf__47025.4836873666$1314186175$gmane$org@redhat.com> 1 sibling, 1 reply; 13+ messages in thread From: Phil Muldoon @ 2011-08-24 11:42 UTC (permalink / raw) To: Andrew Oakley; +Cc: Tom Tromey, Daniel Jacobowitz, gdb-patches, gdb Andrew Oakley <andrew@ado.is-a-geek.net> writes: > On 19/08/11 15:13, Tom Tromey wrote: >>>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes: >> >> Daniel> I don't suppose we can avoid exposing this internal C wart to Python, >> Daniel> and expose it some other way... ? >> >> I think it depends on whether we have shipped it or not. >> If we have, then perhaps someone is using it; in that case I would >> rather not break it. > > Yes, you've shipped it. At least one person is using it (me). I'd > prefer it if this didn't go away. > >> However, even in that case, we can still add a new attribute with a >> better name and recommend that people use it. > > Thats fair enough, but for now can we please get the documentation updated? Didn't Eli already approve it? If so, do you have FSF paperwork filed (I'm not a maintainer, so I won't hazard a guess if this is ok to be posted by another committer). OTOH, if you see yourself doing more GDB hacking, and do not have paperwork, best to get that underway. Sometimes there can be long delays in that process. Cheers Phil ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Some Python ideas, looking for feedback 2011-08-24 11:42 ` Phil Muldoon @ 2011-08-24 11:46 ` Andrew Oakley 2011-08-24 16:17 ` Phil Muldoon 0 siblings, 1 reply; 13+ messages in thread From: Andrew Oakley @ 2011-08-24 11:46 UTC (permalink / raw) To: pmuldoon; +Cc: Tom Tromey, Daniel Jacobowitz, gdb-patches, gdb On 24/08/11 12:42, Phil Muldoon wrote: > Andrew Oakley <andrew@ado.is-a-geek.net> writes: > >> On 19/08/11 15:13, Tom Tromey wrote: >>>>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes: >>> >>> Daniel> I don't suppose we can avoid exposing this internal C wart to Python, >>> Daniel> and expose it some other way... ? >>> >>> I think it depends on whether we have shipped it or not. >>> If we have, then perhaps someone is using it; in that case I would >>> rather not break it. >> >> Yes, you've shipped it. At least one person is using it (me). I'd >> prefer it if this didn't go away. >> >>> However, even in that case, we can still add a new attribute with a >>> better name and recommend that people use it. >> >> Thats fair enough, but for now can we please get the documentation updated? > > Didn't Eli already approve it? Oops, it looks like he did but it just hasn't been committed yet. > If so, do you have FSF paperwork filed (I'm not a maintainer, so I won't > hazard a guess if this is ok to be posted by another committer). The paperwork has already been done (I'm not sure it's really necessary here anyway). Thanks -- Andrew Oakley ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Some Python ideas, looking for feedback 2011-08-24 11:46 ` Andrew Oakley @ 2011-08-24 16:17 ` Phil Muldoon 0 siblings, 0 replies; 13+ messages in thread From: Phil Muldoon @ 2011-08-24 16:17 UTC (permalink / raw) To: Andrew Oakley; +Cc: Tom Tromey, Daniel Jacobowitz, gdb-patches, gdb Andrew Oakley <andrew@ado.is-a-geek.net> writes: >> Didn't Eli already approve it? > > Oops, it looks like he did but it just hasn't been committed yet. > >> If so, do you have FSF paperwork filed (I'm not a maintainer, so I won't >> hazard a guess if this is ok to be posted by another committer). > > The paperwork has already been done (I'm not sure it's really necessary > here anyway). If you have maintainer approval, FSF paperwork approved and filed, and write-after-approval status, you should check it in. Cheers Phil ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <m3aaazavdq.fsf__47025.4836873666$1314186175$gmane$org@redhat.com>]
* Re: Some Python ideas, looking for feedback [not found] ` <m3aaazavdq.fsf__47025.4836873666$1314186175$gmane$org@redhat.com> @ 2011-08-25 17:59 ` Tom Tromey 0 siblings, 0 replies; 13+ messages in thread From: Tom Tromey @ 2011-08-25 17:59 UTC (permalink / raw) To: pmuldoon; +Cc: Andrew Oakley, Daniel Jacobowitz, gdb-patches, gdb >>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes: Phil> Didn't Eli already approve it? Yes. I'm checking it in. Andrew, please write a ChangeLog entry next time. Here is what I am using: 2011-08-25 Andrew Oakley <andrew@ado.is-a-geek.net> * gdb.texinfo (Types In Python): Document 'bitpos' for enums. Phil> If so, do you have FSF paperwork filed (I'm not a maintainer, so I won't Phil> hazard a guess if this is ok to be posted by another committer). Phil> OTOH, if you see yourself doing more GDB hacking, and do not have Phil> paperwork, best to get that underway. Sometimes there can be long Phil> delays in that process. If you already have paperwork, you can get write-after-approval access; contact me off-list. Tom ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2011-08-25 17:59 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <09787EF419216C41A903FD14EE5506DD0151D583A2@AUSX7MCPC103.AMER.DELL.COM>
[not found] ` <201108161345.33448.andre.poenitz@nokia.com>
[not found] ` <09787EF419216C41A903FD14EE5506DD0151D585D2@AUSX7MCPC103.AMER.DELL.COM>
[not found] ` <20110817193710.59945561@ado-gentoo>
2011-08-17 19:13 ` Some Python ideas, looking for feedback Andrew Oakley
2011-08-17 19:29 ` Eli Zaretskii
2011-08-17 19:35 ` Andrew Oakley
2011-08-17 20:38 ` Eli Zaretskii
2011-08-17 20:52 ` Daniel Jacobowitz
2011-08-17 21:15 ` Paul_Koning
2011-08-19 14:14 ` Tom Tromey
[not found] ` <CAN9gPaFPhVYmfUO0sZeMUUy0X7x+hyUd8wDFJZXbe98RVvTLSw__33957.6404345737$1313614343$gmane$org@mail.gmail.com>
2011-08-19 14:14 ` Tom Tromey
2011-08-24 9:48 ` Andrew Oakley
2011-08-24 11:42 ` Phil Muldoon
2011-08-24 11:46 ` Andrew Oakley
2011-08-24 16:17 ` Phil Muldoon
[not found] ` <m3aaazavdq.fsf__47025.4836873666$1314186175$gmane$org@redhat.com>
2011-08-25 17:59 ` Tom Tromey
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox