public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Debug output
@ 2003-07-30 17:35 Jeremy Godfrey
  2003-07-30 17:59 ` Keith Seitz
  0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Godfrey @ 2003-07-30 17:35 UTC (permalink / raw)
  To: insight

Hi,

I'm using insight with cygwin/mingw on Windows XP. I use the Win32 call
OutputDebugString in my debug/checked build to monitor the running program.
When using straight gdb this results in output to the gdb console but with
insight it results in loads of message boxes that make debugging impossible.
Is there any way to change this behaviour?

Regards,
Jeremy Godfrey

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.502 / Virus Database: 300 - Release Date: 18/07/2003
 

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

* Re: Debug output
  2003-07-30 17:35 Debug output Jeremy Godfrey
@ 2003-07-30 17:59 ` Keith Seitz
  2003-07-30 18:44   ` Jeremy Godfrey
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Seitz @ 2003-07-30 17:59 UTC (permalink / raw)
  To: Jeremy Godfrey; +Cc: insight

On Wed, 2003-07-30 at 10:35, Jeremy Godfrey wrote:
> I'm using insight with cygwin/mingw on Windows XP. I use the Win32 call
> OutputDebugString in my debug/checked build to monitor the running program.
> When using straight gdb this results in output to the gdb console but with
> insight it results in loads of message boxes that make debugging impossible.
> Is there any way to change this behaviour?

Looks like OutputDebugString was hooked up to gdb's warning mechanism.
See gdb/win32-nat.c: handle_output_debug_string.

You've got two options:

1. "Quick" and really hacky option
You'll need to add something to gdbtk_warning in
gdb/gdbtk/generic/gdbtk-hooks.c to recognize that the message is debug 
output and route it to the debug window (if open). That should be pretty
easy. The trick is diffentiating between real warnings and debug output.

If all the output is prepended with some constant message, then it would
be really easy to do this (just check if the warning message begins with
the string).If it doesn't, modify handle_output_debug_string to add
this. (Ok, this is hacky, but it will work.)

2. "Formal" solution
Add a debug output hook/event in gdb and then add the appropriate event
handler in insight. IMO, this is easier to do, but it will require much
more "formal" work: gdb group will need to approve patches and
extensions.

If you are a software hoarder and not interested in extending the
functionality of insight or gdb for others, take your pick of which
method to use. (I would still use #2, I think it would be easier and
cleaner than #1.) But please consider submitting patches and starting a
discussion on the gdb mailing list about inferior debug messages.

Keith


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

* RE: Debug output
  2003-07-30 17:59 ` Keith Seitz
@ 2003-07-30 18:44   ` Jeremy Godfrey
  0 siblings, 0 replies; 3+ messages in thread
From: Jeremy Godfrey @ 2003-07-30 18:44 UTC (permalink / raw)
  To: insight

Thanks Keith,

I will take a look at option 2.

Jeremy

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.502 / Virus Database: 300 - Release Date: 18/07/2003
 

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

end of thread, other threads:[~2003-07-30 18:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-30 17:35 Debug output Jeremy Godfrey
2003-07-30 17:59 ` Keith Seitz
2003-07-30 18:44   ` Jeremy Godfrey

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).