public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Annotations, level 2
@ 2012-04-13 11:20 Phil Muldoon
  2012-04-13 12:16 ` Pedro Alves
  2012-04-13 12:46 ` Joel Brobecker
  0 siblings, 2 replies; 4+ messages in thread
From: Phil Muldoon @ 2012-04-13 11:20 UTC (permalink / raw)
  To: gdb


Hi all,

For the last while I have been working on bringing the concept of
Frame filters to the Python API.  This has been going super.  However
in "print_frame_info", annotations are attached to the printed frame
sub-sections -- but only if annotations are set to "2".

To my knowledge, emacs is the only user "I know about" that still uses
annotations, and it uses level "3".

Ordinarily, this would not be a problem, but the annotation call for
the beginning of frame printing requires a frame architecture.  This
spoils the abstract notion of Frame filters (frame filters can wrap a
frame, or just simulate one).  I could probably mock up a dummy-frame,
but I got to be thinking, is it worth that effort?  I don't think so.

These annotations are only exposed to level 2, and after (an
admittedly brief) search, I can no find no product or project that
uses annotations beyond emacs.  As the annotation calls for frames is
exclusively "2" (IE, == 2), and, as far as I can tell, emacs does not use
these markups.

So what's the approach here?  Do I have to support it just because it
is there?

Cheers,

Phil

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Annotations, level 2
  2012-04-13 11:20 Annotations, level 2 Phil Muldoon
@ 2012-04-13 12:16 ` Pedro Alves
  2012-04-13 12:56   ` Phil Muldoon
  2012-04-13 12:46 ` Joel Brobecker
  1 sibling, 1 reply; 4+ messages in thread
From: Pedro Alves @ 2012-04-13 12:16 UTC (permalink / raw)
  To: Phil Muldoon; +Cc: gdb

On 04/13/2012 12:20 PM, Phil Muldoon wrote:

> 
> For the last while I have been working on bringing the concept of
> Frame filters to the Python API.  This has been going super.  However
> in "print_frame_info", annotations are attached to the printed frame
> sub-sections -- but only if annotations are set to "2".



> Ordinarily, this would not be a problem, but the annotation call for
> the beginning of frame printing requires a frame architecture.  This

I just looked at all the "annotation_level == 2" checks in
annotate.c, and I didn't see any that used an architecture.

Are you talking about annotate_frame_begin?  That one looks like:

void
annotate_frame_begin (int level, struct gdbarch *gdbarch, CORE_ADDR pc)
{
  if (annotation_level > 1)
    printf_filtered (("\n\032\032frame-begin %d %s\n"),
		     level, paddress (gdbarch, pc));
}

So this should be being output also when the level is set to "3" ?

> 
> To my knowledge, emacs is the only user "I know about" that still uses
> annotations, and it uses level "3".



-- 
Pedro Alves

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Annotations, level 2
  2012-04-13 11:20 Annotations, level 2 Phil Muldoon
  2012-04-13 12:16 ` Pedro Alves
@ 2012-04-13 12:46 ` Joel Brobecker
  1 sibling, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2012-04-13 12:46 UTC (permalink / raw)
  To: Phil Muldoon; +Cc: gdb

> To my knowledge, emacs is the only user "I know about" that still uses
> annotations, and it uses level "3".

[real quick]
GPS also still uses annotations, at level 2 IIRC. Once we clarify
which piece of annotation you are referring to, I can contact the
GPS developers, and see what they say.

-- 
Joel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Annotations, level 2
  2012-04-13 12:16 ` Pedro Alves
@ 2012-04-13 12:56   ` Phil Muldoon
  0 siblings, 0 replies; 4+ messages in thread
From: Phil Muldoon @ 2012-04-13 12:56 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb

On 04/13/2012 01:16 PM, Pedro Alves wrote:
> On 04/13/2012 12:20 PM, Phil Muldoon wrote:
> 
>>
>> For the last while I have been working on bringing the concept of
>> Frame filters to the Python API.  This has been going super.  However
>> in "print_frame_info", annotations are attached to the printed frame
>> sub-sections -- but only if annotations are set to "2".
> 
> 
> 
>> Ordinarily, this would not be a problem, but the annotation call for
>> the beginning of frame printing requires a frame architecture.  This
> 
> I just looked at all the "annotation_level == 2" checks in
> annotate.c, and I didn't see any that used an architecture.
> 
> Are you talking about annotate_frame_begin?  That one looks like:
> 
> void
> annotate_frame_begin (int level, struct gdbarch *gdbarch, CORE_ADDR pc)
> {
>   if (annotation_level > 1)
>     printf_filtered (("\n\032\032frame-begin %d %s\n"),
> 		     level, paddress (gdbarch, pc));
> }
> So this should be being output also when the level is set to "3" ?

Yeah.  Darn it.  All the other frame annotations at a quick glance are
for only level 2.  Must have missed that one for some reason, or
misread the code.  I guess the answer to my question then is yes, I
have to support that initial call.

Cheers,

Phil



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-13 12:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13 11:20 Annotations, level 2 Phil Muldoon
2012-04-13 12:16 ` Pedro Alves
2012-04-13 12:56   ` Phil Muldoon
2012-04-13 12:46 ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).