public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Problems with load
@ 2003-08-27  7:19 Hylla, Kai
  2003-08-27 14:32 ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Hylla, Kai @ 2003-08-27  7:19 UTC (permalink / raw)
  To: gdb

Hi!

I've problems using the gdb load instruction. The command is executed.
But the file is no written correctly into the RAM. Some addresses are
not written. They still contain the value they had prior to the load
command. This behavior is address indepentend. If I move the progam into
anonther location the problem still exist.

I tested some things and discovert that the set instruction is not
executed if the data type is char or short. (Readaccess with datatype
char and shor works.) I'm not sure if this my cause the load problem. If
the CPU executes byte or short writes to the memory it works. So in IMHO
it can't be a hardwareproblem.

I think that the problem is caused due to a gdb configuration error. I
tried several settings (e.g. set download-write-size, set remote
memory-write-packet-size)but it doesn't help.

I use <target remote localhost:8888> where OcdLibDemon from Macraigor is
listening. If I use <monitor char> or <monitor short> to write to the
address it works. Because of that, the OcdLibDemon configuration <-c
PPC5XX8XX -d WIGGLER -a 1 -s 1> should be correct.

Which settings I can use to modify gdbs load and set related behaviour?

Thanks and regards,
Kai

---
K. Hylla
Abt. NJT T3

ATLAS Elektronik GmbH
A BAE Systems Company
Sebaldsbruecker Heerstr. 235
D-28305 Bremen

Tel.: +49 421 457-3231
Fax : +49 421 457-1702 

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

* Re: Problems with load
  2003-08-27  7:19 Problems with load Hylla, Kai
@ 2003-08-27 14:32 ` Andrew Cagney
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2003-08-27 14:32 UTC (permalink / raw)
  To: Hylla, Kai; +Cc: gdb

Several things to check:

- Is the section being loaded marked as LOAD?
Run 'objdump -h <pgm>' on the executable being loaded and check that all 
the sections that GDB should load have the LOAD attribute.

- Is GDB transfering the data?
There should be output from "load" indicating what GDB is transfering. 
Is the missing section in the list.

- Is GDB really transfering the data?
Enabe remote protocol debugging "(gdb) set debug remote 1" and then 
perform a load.  You should see memory write packets to the sections in 
question.

If all of these are ok, then the problem is in the remote end.

Andrew

> I've problems using the gdb load instruction. The command is executed.
> But the file is no written correctly into the RAM. Some addresses are
> not written. They still contain the value they had prior to the load
> command. This behavior is address indepentend. If I move the progam into
> anonther location the problem still exist.
> 
> I tested some things and discovert that the set instruction is not
> executed if the data type is char or short. (Readaccess with datatype
> char and shor works.) I'm not sure if this my cause the load problem. If
> the CPU executes byte or short writes to the memory it works. So in IMHO
> it can't be a hardwareproblem.
> 
> I think that the problem is caused due to a gdb configuration error. I
> tried several settings (e.g. set download-write-size, set remote
> memory-write-packet-size)but it doesn't help.
> 
> I use <target remote localhost:8888> where OcdLibDemon from Macraigor is
> listening. If I use <monitor char> or <monitor short> to write to the
> address it works. Because of that, the OcdLibDemon configuration <-c
> PPC5XX8XX -d WIGGLER -a 1 -s 1> should be correct.
> 
> Which settings I can use to modify gdbs load and set related behaviour?
> 
> Thanks and regards,
> Kai
> 
> ---
> K. Hylla
> Abt. NJT T3
> 
> ATLAS Elektronik GmbH
> A BAE Systems Company
> Sebaldsbruecker Heerstr. 235
> D-28305 Bremen
> 


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

* Re: Problems with load
  2003-08-28 20:12 ` Andrew Cagney
@ 2003-08-29  1:59   ` Peter Reilley
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Reilley @ 2003-08-29  1:59 UTC (permalink / raw)
  To: Hylla, Kai; +Cc: gdb


----- Original Message ----- 
To: "Hylla, Kai" <hylla.k@atlas.de>
Cc: <gdb@sources.redhat.com>
Sent: Thursday, August 28, 2003 4:12 PM
Subject: Re: Problems with load


> > Hi!
> > 
> > The sections are loaded. The error is not, that a hole section isn't
> > loaded. Instead contain the loaded sections byte errors. It seems that
> > some bytes aren't written. The debug messages are all OK.
> > 
> > As I said before <set *(char*)> and <set *(short*)> aren't working
> > either. 
> > 
> > One of the load debug messages is :
> > 
> > Sending packed: $x14000d4,314:8\000[snip] where
> > X14000d4   is the address where the data is written to and
> > 314        is the size of the block which will be written, right?
> > 
> > Is there a possibility to change the minimum block size? I.e. limit it
> > to 4 bytes? I think that this will solve the problem...
> > It seems that the target can't handle packages who write data where the
> > data isn't 4 Byte aligned.

This packet is aligned on 4 bytes so that can't be the problem.
Can you read the memory back and does it look OK?   What errors
are reported when you try to write a byte or short?   OcdLibRemote
will print some errors that it sees.

Pete.

Pete.

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

* Re: Problems with load
  2003-08-27 15:00 Hylla, Kai
@ 2003-08-28 20:12 ` Andrew Cagney
  2003-08-29  1:59   ` Peter Reilley
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2003-08-28 20:12 UTC (permalink / raw)
  To: Hylla, Kai; +Cc: gdb

> Hi!
> 
> The sections are loaded. The error is not, that a hole section isn't
> loaded. Instead contain the loaded sections byte errors. It seems that
> some bytes aren't written. The debug messages are all OK.
> 
> As I said before <set *(char*)> and <set *(short*)> aren't working
> either. 
> 
> One of the load debug messages is :
> 
> Sending packed: $x14000d4,314:8\000[snip] where
> X14000d4   is the address where the data is written to and
> 314        is the size of the block which will be written, right?
> 
> Is there a possibility to change the minimum block size? I.e. limit it
> to 4 bytes? I think that this will solve the problem...

Not really.  You could combinations of:

(gdb) set remote X-packet off
(gdb) set download-write-size <something>

> It seems that the target can't handle packages who write data where the
> data isn't 4 Byte aligned.

Ah.  That doesn't leave GDB with much it can do :-(

I'm not sure how complete the "mem" command is.

Andrew


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

* RE: Problems with load
@ 2003-08-27 15:00 Hylla, Kai
  2003-08-28 20:12 ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Hylla, Kai @ 2003-08-27 15:00 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb

Hi!

The sections are loaded. The error is not, that a hole section isn't
loaded. Instead contain the loaded sections byte errors. It seems that
some bytes aren't written. The debug messages are all OK.

As I said before <set *(char*)> and <set *(short*)> aren't working
either. 

One of the load debug messages is :

Sending packed: $x14000d4,314:8\000[snip] where
X14000d4   is the address where the data is written to and
314        is the size of the block which will be written, right?

Is there a possibility to change the minimum block size? I.e. limit it
to 4 bytes? I think that this will solve the problem...

It seems that the target can't handle packages who write data where the
data isn't 4 Byte aligned.

Thanks and regard,
Kai


---
K. Hylla
Abt. NJT T3

ATLAS Elektronik GmbH
A BAE Systems Company
Sebaldsbruecker Heerstr. 235
D-28305 Bremen

Tel.: +49 421 457-3231
Fax : +49 421 457-1702 

> -----Original Message-----
> From: Andrew Cagney [mailto:ac131313@redhat.com] 
> Sent: Mittwoch, 27. August 2003 16:32
> To: Hylla, Kai
> Cc: gdb@sources.redhat.com
> Subject: Re: Problems with load
> 
> 
> Several things to check:
> 
> - Is the section being loaded marked as LOAD?
> Run 'objdump -h <pgm>' on the executable being loaded and 
> check that all 
> the sections that GDB should load have the LOAD attribute.
> 
> - Is GDB transfering the data?
> There should be output from "load" indicating what GDB is 
> transfering. 
> Is the missing section in the list.
> 
> - Is GDB really transfering the data?
> Enabe remote protocol debugging "(gdb) set debug remote 1" and then 
> perform a load.  You should see memory write packets to the 
> sections in 
> question.
> 
> If all of these are ok, then the problem is in the remote end.
> 
> Andrew
> 
> > I've problems using the gdb load instruction. The command 
> is executed. 
> > But the file is no written correctly into the RAM. Some 
> addresses are 
> > not written. They still contain the value they had prior to 
> the load 
> > command. This behavior is address indepentend. If I move the progam 
> > into anonther location the problem still exist.
> > 
> > I tested some things and discovert that the set instruction is not 
> > executed if the data type is char or short. (Readaccess 
> with datatype 
> > char and shor works.) I'm not sure if this my cause the 
> load problem. 
> > If the CPU executes byte or short writes to the memory it 
> works. So in 
> > IMHO it can't be a hardwareproblem.
> > 
> > I think that the problem is caused due to a gdb 
> configuration error. I 
> > tried several settings (e.g. set download-write-size, set remote 
> > memory-write-packet-size)but it doesn't help.
> > 
> > I use <target remote localhost:8888> where OcdLibDemon from 
> Macraigor 
> > is listening. If I use <monitor char> or <monitor short> to 
> write to 
> > the address it works. Because of that, the OcdLibDemon 
> configuration 
> > <-c PPC5XX8XX -d WIGGLER -a 1 -s 1> should be correct.
> > 
> > Which settings I can use to modify gdbs load and set related 
> > behaviour?
> > 
> > Thanks and regards,
> > Kai
> > 
> > ---
> > K. Hylla
> > Abt. NJT T3
> > 
> > ATLAS Elektronik GmbH
> > A BAE Systems Company
> > Sebaldsbruecker Heerstr. 235
> > D-28305 Bremen
> > 
> 
> 
> 

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

end of thread, other threads:[~2003-08-29  1:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-27  7:19 Problems with load Hylla, Kai
2003-08-27 14:32 ` Andrew Cagney
2003-08-27 15:00 Hylla, Kai
2003-08-28 20:12 ` Andrew Cagney
2003-08-29  1:59   ` Peter Reilley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).