This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [PATCH] -stack-select-frame


On Fri, Jun 17, 2005 at 10:50:30AM +1200, Nick Roberts wrote:
>  > My concern was that this added a new item to a response which previous
>  > had zero.  Why do you think people couldn't use it as is?  Seems
>  > perfectly usable to me; if you know the level of a frame you want to
>  > select, then you probably already have the result of a backtrace which
>  > includes a printout of the stack frame, so you probably don't need
>  > another!
> 
> -stack-select-frame without an argument currently works like the CLI command
> "frame" without the output.  All "frame" does is output the current frame,
> so without output its a bit of a no-op.

OK, so obviously that's a loss.  Either we should:
 - reject it without an argument
 - make it print without an argument
 - make it print always

You did the last of those.  I'm trying to figure out if other users of
-stack-select-frame want that behavior.

>  > Could you explain why you think we need output here?
> 
> If you have a backtrace then, no, you don't need the output and the frontend
> can ignore it.  However, I presume "-stack-select-frame" runs more quickly
> than "-stack-list-frames" so, if you don't need a backtrace, its probably best
> not to require one.

We've already got -stack-info-frame.  If you want to avoid
-stack-list-frames, is it unreasonable to do the two round trips for
-stack-select-frame / -stack-info-frame?  From Jason's measurements, it
sounds like that isn't a problem.

Not that it would be a terrible change to print out the frame.  It's
just a question of whether there's benefit.  It'll make
-stack-select-frame (again, only marginally) slower.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]