Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Controlling gdb outside the terminal
@ 2007-09-07  1:33 Brother Josef
       [not found] ` <20070907015455.GA23872@caradoc.them.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Brother Josef @ 2007-09-07  1:33 UTC (permalink / raw)
  To: gdb

I have a small amount of UNIX knowledge but have been using the gdb  
on the command line and decided it would be possible to make a GUI to  
debug Pascal under Mac OS X. With my limited knowledge I found that  
calls to popen and reading the stream would work to with most  
commands but gdb complains "gdb) Exception condition detected on fd 0  
error detected on stdin". gpd runs a seperate process so I think I  
need to be sending commands to that pid  but I just can't figure it  
out. Could anyone point me to some informations? thanks for your time.

Regards,
         Josef




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

* Re: Controlling gdb outside the terminal
       [not found] ` <20070907015455.GA23872@caradoc.them.org>
@ 2007-09-07 11:18   ` Brother Josef
  2007-09-07 11:46     ` Bob Rossi
  0 siblings, 1 reply; 3+ messages in thread
From: Brother Josef @ 2007-09-07 11:18 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

excellent, thank you. and yes actually I do need to look into MI  
mode, I'm new to GDB and just now considering it as the future in how  
I might be debugging. Could I run GDB without that error and continue  
to write and read from the program from within my Mac app?

Could anyone point me to any source code on pseudo-terminals or  
documents? I have been looking around today and I still can't get a  
clear picture of how such code would look providing I could even  
write it. ;) thanks again

On Sep 7, 2007, at 8:54 AM, Daniel Jacobowitz wrote:

> On Fri, Sep 07, 2007 at 08:12:55AM +0700, Brother Josef wrote:
>> I have a small amount of UNIX knowledge but have been using the  
>> gdb on the
>> command line and decided it would be possible to make a GUI to  
>> debug Pascal
>> under Mac OS X. With my limited knowledge I found that calls to  
>> popen and
>> reading the stream would work to with most commands but gdb  
>> complains "gdb)
>> Exception condition detected on fd 0 error detected on stdin". gpd  
>> runs a
>> seperate process so I think I need to be sending commands to that  
>> pid  but I
>> just can't figure it out. Could anyone point me to some  
>> informations? thanks
>> for your time.
>
> You need to read up on pseudo-terminals and job control for Unix
> systems.  However, I don't think you will need to if you use GDB
> in MI mode; that is highly recommended for front ends.
>
> -- 
> Daniel Jacobowitz
> CodeSourcery

Regards,
         Josef





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

* Re: Controlling gdb outside the terminal
  2007-09-07 11:18   ` Brother Josef
@ 2007-09-07 11:46     ` Bob Rossi
  0 siblings, 0 replies; 3+ messages in thread
From: Bob Rossi @ 2007-09-07 11:46 UTC (permalink / raw)
  To: Brother Josef; +Cc: Daniel Jacobowitz, gdb

On Fri, Sep 07, 2007 at 05:54:40PM +0700, Brother Josef wrote:
> excellent, thank you. and yes actually I do need to look into MI  
> mode, I'm new to GDB and just now considering it as the future in how  
> I might be debugging. Could I run GDB without that error and continue  
> to write and read from the program from within my Mac app?
> 
> Could anyone point me to any source code on pseudo-terminals or  
> documents? I have been looking around today and I still can't get a  
> clear picture of how such code would look providing I could even  
> write it. ;) thanks again

Here is a gdb/mi parser.
  http://cgdb.svn.sourceforge.net/viewvc/cgdb/cgdb/trunk/lib/gdbmi/
I would start out using that. I currently have not used this parser in a
production front end yet, however, I expect to do this soon, especially
since my push parser patch is finally complete in bison. That means I
can convert the parser to being completely non blocking.

It is capable of parsing all of the mi commands that the gdb testsuite
outputs. 

Here is the code I use to open a pseudo terminal,
  http://cgdb.svn.sourceforge.net/viewvc/cgdb/cgdb/trunk/various/util/include/pseudo.h?view=log
  http://cgdb.svn.sourceforge.net/viewvc/cgdb/cgdb/trunk/various/util/src/pseudo.c?view=log

Enjoy,
Bob Rossi



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

end of thread, other threads:[~2007-09-07 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-07  1:33 Controlling gdb outside the terminal Brother Josef
     [not found] ` <20070907015455.GA23872@caradoc.them.org>
2007-09-07 11:18   ` Brother Josef
2007-09-07 11:46     ` Bob Rossi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox