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

* Re: The debuggee's output
  2000-08-22  3:38 The debuggee's output Pierre Muller
@ 2000-08-22  5:14 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2000-08-22  5:14 UTC (permalink / raw)
  To: muller; +Cc: sashang, gdb

> Date: Tue, 22 Aug 2000 12:30:32 +0200
> From: Pierre Muller <muller@cerbere.u-strasbg.fr>
> 
> 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.

That's not entirely accurate.  The DOS port of GDB has special code to
separate debuggee's output from its own (and the same for input).  So
output of GDB and of the debuggee is no more mixed on screen on DOS
than it is on Unix.

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

You can redirect the debugge's output on DOS as well, although not
with these commands.
From Peter.Schauer@regent.e-technik.tu-muenchen.de Tue Aug 22 07:35:00 2000
From: "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
To: benoit.millot@cstelecom.com (Benoit MILLOT)
Cc: gdb@sourceware.cygnus.com
Subject: Re: About GDB user-defined commands ?
Date: Tue, 22 Aug 2000 07:35:00 -0000
Message-id: <200008221435.QAA16424@reisser.regent.e-technik.tu-muenchen.de>
References: <39A26231.4006C605@cstelecom.com>
X-SW-Source: 2000-08/msg00105.html
Content-length: 1711

Oops, I've been using this trick with commands that evaluate their arguments,
but the monitor command passes its arguments without evaluation.

$argN variables are implemented with a string substitution hack on the
command line before it is passed to the command processor, but you cannot
assign to them, as you noted.

I am afraid that you cannot achieve what you want, sorry.

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

-- 
Peter Schauer			pes@regent.e-technik.tu-muenchen.de
From dima@Chg.RU Tue Aug 22 07:49:00 2000
From: "Dmitry S. Sivachenko" <dima@Chg.RU>
To: gdb@sourceware.cygnus.com
Subject: Chill Question
Date: Tue, 22 Aug 2000 07:49:00 -0000
Message-id: <20000822184842.A52691@netserv1.chg.ru>
X-SW-Source: 2000-08/msg00106.html
Content-length: 356

Hello!

I am asking this question second time because it is very important
for me: I am translation GDB manual into Russian and I don't know
anything about Chill language :-(.

Please explain me what do these terms mean (in terms of C or
Pascal language which I know):

1) mode
2) member mode
3) varying mode
4) instance mode


Thank you in advance,
Dima.
From shaunj@gray-interfaces.com Tue Aug 22 15:09:00 2000
From: "Shaun Jackman" <shaunj@gray-interfaces.com>
To: "gdb list" <gdb@sources.redhat.com>
Subject: serial RDI
Date: Tue, 22 Aug 2000 15:09:00 -0000
Message-id: <006c01c00c85$8454af60$6801a8c0@gray.internal>
X-SW-Source: 2000-08/msg00107.html
Content-length: 1606

I have an Atmel EB40, AT91M40807 processor (ARM7TDMI) which came with an
Angel monitor in flash. I'm having difficulty connecting to it at any baud
rate above 9600.
I'm using Insight 5.0, but am running it no-windows (-nw) to try to sort out
this remote debugging problem.

This is the problem I run into...

This GDB was configured as "--host=i586-pc-linux-gnu --target=arm-elf".
(gdb) file main.elf
Reading symbols from main.elf...done.
(gdb) set remotebaud 19200
(gdb) target rdi /dev/ttyS1
Angel Debug Monitor (serial) 1.04 (Advanced RISC Machines SDT 2.5) for
AT91EB40
(2.00)
Angel Debug Monitor rebuilt on Apr 07 2000 at 12:40:31
Serial Rate:  19200
[dies here and never comes back]
It silently ignores ctrl-c and makes no response to a SIGINT
I have to send a SIGKILL to get my console back.

But it works at 9600...
This GDB was configured as "--host=i586-pc-linux-gnu --target=arm-elf".
(gdb) set remotebaud 9600
(gdb) file main.elf
Reading symbols from main.elf...done.
(gdb) target rdi /dev/ttyS1
Angel Debug Monitor (serial) 1.04 (Advanced RISC Machines SDT 2.5) for
AT91EB40
(2.00)
Angel Debug Monitor rebuilt on Apr 07 2000 at 12:40:31
Serial Rate:   9600
Connected to ARM RDI target.
(gdb)
[works]

I can run it up to 38400 with the ARM Ltd. debugger, but have been
unsuccessful running it any faster than 9600 with gdb.
I would really like to get this working at a faster baudrate, and gdb's lack
of comunication when it fails is disconcerting.
Any suggestions on where I could start trouble shooting?
I tried
set debug remote 1
but the output was no different than above.

Thanks,
Shaun



^ 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