Subject: RE: cross gdb & debugging agent

From: Lavu Sridhar <[email-masked]>
Date: Fri, 26 May 2000 15:06:38 +0530 (IST)

Hello,

	I have realised that I have not set the target pc options in the
gdb. In the configure file, I have changed the target_alias to arm. Where
else should I make changes? Currently it was set to i686 architecture.

	How do you change register contents, because once i download the
image it starts executing the image. How to put breakpoints, before it
starts executing? I am using target rdi /dev/ttyS0 (first command) and
then load vmlinux (2nd command)

	Thanks for all the help,

Regards,
Lavu Sridhar

-----------------------------------------------------------

>Then GDB can download vmlinux image.
>After downloading image, maybe you need to change CPSR register if the initial
>mode is USER32 because linux should be started with SVC32 mode.
>You can see the register values by the command "info registers".
>After fixing all these things, you can run by the "continue" command.

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Jungjun Kim <[email-masked]>
Date: Tue, 30 May 2000 09:20:18 +0900

I'm sorry maybe mail system has some problem. and the following is my reply.

---------- forwarding ----------
Subject: RE: cross gdb & debugging agent
Date: Fri, 26 May 2000 08:39:04 +0900
From: Jungjun Kim <[email-masked]>

You can figure out this problem if you know how ANGEL looks RAM address space.
I mean that you need to make link vmlinux again with defferent base address
offset, not 0xc0008000.
You can change base address by editing linux/arch/arm/Makefile .
But I'm not sure this is the right way.

To conserve this base address, 0xc0008000, you have to change ANGEL's vitual
address space by modifing page table in order to map 0xc0000000 to your
physical ram address space.

However there is still problem to use gdb/angel as linux kernel debugger because
there is the problem in interworking between ANGEL and linux.
Because ANGEL and linux have it's own exception table and current linux doen't
have any way to know ANGEL, maybe running linux can write it's own data to ANGEL
code/data area, or exclude ANGEL code/data area by setting it's own pagetable.
I mean that you have to prepare the way to ANGEL from linux when the running
linux reaches breakpoint in order to use debuggin kernel.
If you want to use ANGEL just as bootloader, this won't be a problem.

Jungjun Kim

> I have got the gdb working and it is talking to the board. ie when i give
>the command target rdi /dev/ttyS0 it gives the message saying that it is
>connected to ARM RDI target. 
> 
> Next I have compiled the linux kernel 2.3.99 using the arm-linux cross
> tool chain. When I gave the command load vmlinux, it gave the following
> error message:
> 
> (gdb) load vmlinux
> Loading section .init, size 0x8000 lma 0xc0008000
> RDI_write: data abort, no memory at specified address?
> RDI_write: data abort, no memory at specified address?
> Memory access error while loading section .init.
> 
> What could be the mistake?
> 
> regards,
> -lavu sridhar
-------------------------------------------------------

-- 

----------------------------------------------o00--(_)--00o-------
    Jungjun Kim       System Software Engineer
                      Application Team, Hyundai Electronics
    Office) +82-2-3459-3205
    FAX)    +82-2-3459-5843
                                               .oooO Oooo.
    mailto:[email-masked]                     (   ) (   )
------------------------------------------------\ (---) /---------
                                                 \_) (_/

---

From: Jungjun Kim <[email-masked]>
Date: Tue, 30 May 2000 13:30:23 +0900

Hello,

It looks like ANGEL cannot load image onto 0x10008000.
Basically ANGEL has private memory map which defines memory address space it can
use. So I think that you need to port ANGEL if the address(0x10008000) is in
DRAM space.

Jungjun Kim

> Loading section .text, size 0x536e0 lma 0x10008000
> RDI_write : internal error, supervisor state not accessible to monitor
> RDI_write : internal error, supervisor state not accessible to monitor
> Memory access error while loading .text.
> 
> I have a 16 MB DRAM and no Flash on the board, and are debugging using
> gdb5.0 with target rdi /dev/ttyS0
> 
> what could be wrong....