Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: The debuggee's output
@ 2000-08-22  3:38 Pierre Muller
  2000-08-22  5:14 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Pierre Muller @ 2000-08-22  3:38 UTC (permalink / raw)
  To: Sashan Govender; +Cc: gdb

At 12:06 22/08/00 , you wrote:
>I've been debugging gdb5 with gdb5 in an attempt to figure out how it works 
>and, more specifically, how gdb handles output from the inferior/debuggee. I 
>can't find the functions that take care of this. Please could some one 
>explain how it works.

GDB does nothing with debuggee's output.

  On basic system as Dos this will for instance result in a mixing of GDB
output and 
the debuggee output on screen.
  On other system, you can define another screen output for the debuggee,
which avoid this mess.
(see "set tty" command on linux or 
"set new-console" on cygwin win32)
But this doesn't change what I said above, GDB does not interfere with the
debuggee's
output (be it on screen, to a file or whatever else...)
unless you set some breakpoint, watchpoint or tracepoint on
the procedure that do this in the debuggee.

  There might of course be some exceptions, like if the debuggee
tries to write over a file opened by GDB itself, but this should normally
not happen.




Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99
From benoit.millot@cstelecom.com Tue Aug 22 04:17:00 2000
From: "Benoit MILLOT" <benoit.millot@cstelecom.com>
To: "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>, "gdb@sourceware.cygnus.com" <gdb@sourceware.cygnus.com>
Subject: Re: About GDB user-defined commands ?
Date: Tue, 22 Aug 2000 04:17:00 -0000
Message-id: <39A26231.4006C605@cstelecom.com>
References: <200008211711.TAA15504@reisser.regent.e-technik.tu-muenchen.de>
X-SW-Source: 2000-08/msg00103.html
Content-length: 1260

"Peter.Schauer" wrote:

> Try:
>
> define dm
> set var $taddr =3D $arg0
> set var $tsize =3D $arg1
> while $tsize !=3D 0
>    if $tsize >=3D 10
>      monitor dm $taddr $tsize
>      set var $taddr =3D $taddr + 10
>      set var $tsize =3D $tsize - 10
>    else
>      monitor dm $taddr $tsize
>      set var $tsize =3D 0
>    end
> end
> end
>
> > Hello,
> >
> > I want to develop a user-defined command for my own monitor
> > which i have already implemented into gdb with nomitor ops..
> >
> > Can i use a new variable? (answear seems to be NO)
> > Can i make operation (addition, ...) with input argument (arg0 ...)?
> >
> > Any ides will be appreciated.
> > Thanks.
> >
> --
> Peter Schauer                   pes@regent.e-technik.tu-muenchen.de

Thanks,
I have one problem more:

With this, on the serial line there is  :  dm $taddr $tsize       instead=

of   dm 407000 50
Monitor command pass arguments like string without interpretation ?
I want value on serial line.

But the command "monitor dm $arg0 $arg1" in a user-defined command works
fine,
on the serial line (dm 407000 50).

So what is the syntax for pass value instead of string with variable?

Thanks a lot.
                                                                    Beno=EE=
t





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

end of thread, other threads:[~2000-08-22  5:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-22  3:38 The debuggee's output Pierre Muller
2000-08-22  5:14 ` Eli Zaretskii

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