Re: Jeeni & ARM720T with GDB

Fernando Nasser
2000-11-20T09:18:00Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 9863 bytes --]

Michael Leibowitz wrote:
>
> When I try that, I get an error message:
>
> Continuing.
> RDI_execute: a miscellaneous type of error
>
> Program received signal SIGTERM, Terminated.
> ?? () at setup.S:4
> 4 B Reset_Handler
> Current language: auto; currently asm
>
> using gdb 5.0 (insight w/ -nw) and 7211 eval board.
>
> Any ideas?
>

It can be the way you compiled/linked your program or a series of
other reasons. There is not much information above.
Maybe you should post pieces of console output with the relevant
information (the output of "gcc -v", your compilation command and
any messages printed by gcc, etc).

BTW, which host are you running gdb on? Which OS version, libraries...

If I am not mistaken, there were a series of fixes and improvements
to GDB RDI after 5.0 came out. I am not sure that they can make any
difference to your case, but maybe you should consider switching to
more recent sources.

Fernando

> On Mon, 20 Nov 2000 10:48:14 Fernando Nasser wrote:
> > The sequence of commands you should use is:
> >
> > file <exec>
> > target rdi e=....
> > load
> > break <somewhere>
> > cont
> >
> >
> > Don't use the load command argument.

--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
From grante@visi.com Mon Nov 20 14:25:00 2000
From: Grant Edwards <grante@visi.com>
To: Fernando Nasser <fnasser@cygnus.com>
Cc: danish iftikhar <d_iftikhar@hotmail.com>, gdb@sourceware.cygnus.com
Subject: Re: Jeeni & ARM720T with GDB
Date: Mon, 20 Nov 2000 14:25:00 -0000
Message-id: <20001120162802.A11863@visi.com>
References: <F262O6hm8Ua8d9Ee4za00002d74@hotmail.com> <3A1955CE.2A4280C8@cygnus.com>
X-SW-Source: 2000-11/msg00205.html
Content-length: 755

On Mon, Nov 20, 2000 at 04:48:14PM +0000, Fernando Nasser wrote:
> The sequence of commands you should use is:
>
> file <exec>
> target rdi e=....
> load
> break <somewhere>
> cont
>
> Don't use the load command argument.

Why not?

It works fine for me. The macro I use to load an ELF object
file is:

define reload
resetcpu
delete
symbol-file
symbol-file $arg0
load $arg0
break *0x00
break *0x04
break *0x08
break *0x0c
break *0x10
break *0x14
# IRQ at 0x18 is used
break *0x1c
end

After a "reload" then I do "cont" after optionally setting more
breakpoints.

The "resetcpu" command at the top is another macro that resets
a bunch of peripheral chips and puts them into a known state.

--
Grant Edwards
grante@visi.com
From grante@visi.com Mon Nov 20 14:27:00 2000
From: Grant Edwards <grante@visi.com>
To: Michael Leibowitz <mleibowi@crystal.cirrus.com>
Cc: Fernando Nasser <fnasser@cygnus.com>, danish iftikhar <d_iftikhar@hotmail.com>, gdb@sourceware.cygnus.com
Subject: Re: Jeeni & ARM720T with GDB
Date: Mon, 20 Nov 2000 14:27:00 -0000
Message-id: <20001120162925.B11863@visi.com>
References: <F262O6hm8Ua8d9Ee4za00002d74@hotmail.com> <3A1955CE.2A4280C8@cygnus.com> <20001120110414.B23797@spanky>
X-SW-Source: 2000-11/msg00206.html
Content-length: 436

On Mon, Nov 20, 2000 at 11:04:14AM -0600, Michael Leibowitz wrote:

> When I try that, I get an error message:
>
> Continuing.
> RDI_execute: a miscellaneous type of error
>
> Program received signal SIGTERM, Terminated.
> ?? () at setup.S:4
> 4 B Reset_Handler
> Current language: auto; currently asm
>
> using gdb 5.0 (insight w/ -nw) and 7211 eval board.
>
> Any ideas?

The "load" works OK?

--
Grant Edwards
grante@visi.com
From grante@visi.com Mon Nov 20 14:28:00 2000
From: Grant Edwards <grante@visi.com>
To: Fernando Nasser <fnasser@cygnus.com>
Cc: mleibowi@crystal.cirrus.com, danish iftikhar <d_iftikhar@hotmail.com>, gdb@sourceware.cygnus.com
Subject: Re: Jeeni & ARM720T with GDB
Date: Mon, 20 Nov 2000 14:28:00 -0000
Message-id: <20001120163048.C11863@visi.com>
References: <F262O6hm8Ua8d9Ee4za00002d74@hotmail.com> <3A1955CE.2A4280C8@cygnus.com> <20001120110414.B23797@spanky> <3A195CAA.ED939698@cygnus.com>
X-SW-Source: 2000-11/msg00207.html
Content-length: 814

On Mon, Nov 20, 2000 at 05:17:30PM +0000, Fernando Nasser wrote:

> It can be the way you compiled/linked your program or a series of
> other reasons. There is not much information above.
> Maybe you should post pieces of console output with the relevant
> information (the output of "gcc -v", your compilation command and
> any messages printed by gcc, etc).
>
> BTW, which host are you running gdb on? Which OS version, libraries...
>
> If I am not mistaken, there were a series of fixes and improvements
> to GDB RDI after 5.0 came out. I am not sure that they can make any
> difference to your case, but maybe you should consider switching to
> more recent sources.

Most of the changes had to do with Insight GUI issues, but it
couldn't hurt to use a recent snapshot.

--
Grant Edwards
grante@visi.com
From Stephane.Carrez@worldnet.fr Mon Nov 20 14:46:00 2000
From: Stephane Carrez <Stephane.Carrez@worldnet.fr>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: Fernando Nasser <fnasser@cygnus.com>, gdb@sources.redhat.com
Subject: Re: RFC: Components
Date: Mon, 20 Nov 2000 14:46:00 -0000
Message-id: <3A19B7F2.665348DC@worldnet.fr>
References: <3A0B3556.510B850A@cygnus.com> <3A19491E.E2FDB7FB@cygnus.com>
X-SW-Source: 2000-11/msg00208.html
Content-length: 3730

Hi!

Andrew Cagney a Ã©crit :
>
> Fernando Nasser wrote:
> >
> > We got a submission from a contributor that would like to add the following
> > facility to GDB, which can be useful when debugging Operating Systems.
> >
> > An operating system can comprise of several components, each of them
> > linked separately. When doing system debug, the symbols of all the
> > OS components are loaded into GDB. Once loaded, GDB has several symbol
> > files that it uses to search for symbols and debugging information.
>
> (Like J.T. I'm not also sure about the word component)

So do I. But I had no better name to propose/use...

>
> I think this can be broken down into several problems/issues.
>
> GDB is (eventually :-) going to get support for multiple
> processes/actors/.... Such proceses can probably be categorized into
> two classes:
>
> o VM
>
> Where separate processes have
> independant address spaces.
>
> Examples include most modern
> OS's along with UNIX and Linux.
>
> o no-vm
>
> Where separate processes share
> a common address space.
>
> Examples of this would include
> uLinux and MINIX/68k.
>
> I think an extention to GDB's SAL (linespec) syntax needs to be clearly
> defined so that it will be possible to identify the process that a
> symbol belongs to. The exact syntax will likely need more thought
> although the proposal is probably a good starting point. It is more
> natural to use the target OS's process names and that is a departure
> from the current GDB convention which, in the case of threads, adopted
> arbitrary internal numbers.

Yes, but using the target OS's process name is more difficult. The so-called
component may not refer to a process. It can of course, but it can also
represent some code that is loaded.

Doing that requires more changes in Gdb too, since this is target specific.
We also need a way to attach some target specific name to the symtab.

>
> Depending on the kernel, it may be possible to unwind a stack back
> through the user->kernel system call. On such systems, the stack dump
> should clearly identify the process that the stack frames belong to. On
> OSs that use an indirect call to get into the kernel, this is pretty
> much a no-brainer. On OSs that context switch on entry into the kernel,
> this is more complex Something a bit like the code to unwind past a
> single handler would be needed.

Stack unwinding does not work in gdb when you cross a trap/exception handler
It would be good to teach that in Gdb. But it's not easy...

>
> At a more general level, I don't have any real reservations about the
> proposed functionality (I've encountered a number of embedded systems
> where I've had to use smoke and mirrors to get around just this
> problem). The concerns I have are related to the details of the
> implementation and how well the actual changes fit in with the broad
> strategy of evolving GDB into a multi-processor debugger.
>
> Andrew

Using the basename of the symbol file was very simple. I guess it's possible
to use another transformation operation that produces such short printable string.

Stephane

-----------------------------------------------------------------------
Home Office
E-mail: stcarrez@worldnet.fr Stephane.Carrez@sun.com
WWW: http://home.worldnet.fr/stcarrez http://www.sun.com
Mail: 17, rue Foucher Lepelletier 6, avenue Gustave Eiffel
92130 Issy Les Moulineaux 78182 Saint Quentin en Yvelines
France
From mleibowi@crystal.cirrus.com Mon Nov 20 15:34:00 2000
From: Michael Leibowitz <mleibowi@crystal.cirrus.com>
To: Grant Edwards <grante@visi.com>
Cc: Michael Leibowitz <mleibowi@crystal.cirrus.com>, Fernando Nasser <fnasser@cygnus.com>, danish iftikhar <d_iftikhar@hotmail.com>, gdb@sourceware.cygnus.com
Subject: Re: Jeeni & ARM720T with GDB
Date: Mon, 20 Nov 2000 15:34:00 -0000
Message-id: <20001120173821.B24131@spanky>
References: <F262O6hm8Ua8d9Ee4za00002d74@hotmail.com> <3A1955CE.2A4280C8@cygnus.com> <20001120110414.B23797@spanky> <20001120162925.B11863@visi.com>
X-SW-Source: 2000-11/msg00209.html
Content-length: 150

On Mon, 20 Nov 2000 16:29:25 Grant Edwards wrote:
> On Mon, Nov 20, 2000 at 11:04:14AM -0600, Michael Leibowitz wrote:

> The "load" works OK?

Yeah