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: Enhancement - show old and new thread info when switching during debugging


> I've copied output from GDB 7.3 before and after my patch into the bug
> report along with some notes on the implementation.

I think I understand what you are trying to say.  What I am saying is
that you can find which thread you switched from, by going up the
debugger output until you find a "[Switching to Thread ...]" message.
So, the information is already there. I agree it's not ultra convenient,
but I personally think it's better than your approach (the new message
becomes way to long, IMO).

In your case, if going up the output is not good enough, I would
suggest two alternative solutions, in order of preference:
  - Have GDB maintain variable $old_thread or $prev_thread that
    you can then use to switch to the previous thread;

      (gdb) thread $old_thread

    would return you to the previous thread before the switch.
  - At least print the new thread ID first;

-- 
Joel


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