This is the mail archive of the gdb-patches@sourceware.org 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: [RFC] -thread-select double print stack frame


On Wed, Mar 28, 2007 at 09:39:38AM +1200, Nick Roberts wrote:
> Daniel Jacobowitz writes:
>  > On Mon, Mar 26, 2007 at 03:19:31PM +0200, Denis PILAT wrote:
>  > > 2007-03-26  Denis Pilat  <denis.pilat@st.com>
>  > 
>  > > 	* stack.c (print_stack_frame): alway use LOC_AND_ADDRESS in mi output.
>  > > 	* infrun.c (normal_stop): remove mi specific frame printing treatment.
>  > 
>  > This is basically OK; I agree with Nick that it's the right solution.
>  > It needs some formatting fixes, though.
> 
> But why do you think that while file and line details are currenly duplicated
> in MI, they are not in CLI?  (I mean what is the underlying logic/cause, not
> the just the code differences).

Here's what I get from the CLI:

[Switching to thread 1 (Thread 46912506009296 (LWP 28747))]#0  main
(argc=1, argv=0x7fffffffe178)
    at /space/fsf/commit/src/gdb/gdb.c:28
28      {

The first line is the frame description and becomes the new-thread-id
and the frame={} tuple.  The second line ("28 {") comes from
print_source_lines (from lack of ui_source_list).  I think we need
both, because we use print_source_lines in other contexts too, but I'm
not sure about that.

So the short answer is that they are duplicated in the CLI too.  The
two copies are just formatted so differently that it isn't obvious.

This does make me wonder about the patch though.  Denis, could you
hold off on committing it?  Which duplicate copy are you eliminating?
Maybe we should diff two testsuite runs to see what else changes.

-- 
Daniel Jacobowitz
CodeSourcery


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