public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* "Load" problem
@ 2006-02-13 22:08 Mitchell Fang
  2006-02-13 22:22 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Mitchell Fang @ 2006-02-13 22:08 UTC (permalink / raw)
  To: gdb

Has anybody run into this "load" problem before?  Looking at the error
message it says it's due to it failing at the function
target_write_memory_partial in symfile.c.  The thing I don't get is
whether this error is due to error in transferring the program to the
target or is this something wrong with gdb running on the host
machine?  When I look at the remote log file I'm pretty sure that I
wrote the program to memory and returned OK.

A little background on what I'm doing.  I'm implementing a GDB stub
thats connect GDB running on a linux machine to a PowerPC4xx eval
board (target) via a JTAG controller.


[mitchell@karla2 testprog]$ ppc_gdb test/testprog
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=ppc-ibm-linux"...
Setting up the environment for debugging gdb.
No symbol table is loaded.  Use the "file" command.
No symbol table is loaded.  Use the "file" command.

(top-gdb) target remote :8888
Remote debugging using :8888
0x00000000 in ?? ()
(top-gdb) load test/testprog
Loading section .interp, size 0x13 lma 0x80480f4
Memory access error while loading section .interp.



My testprog program is extremely simple.
#include <stdio.h>
#include <stdlib.h>
int main ()
{
	int i;

	i = 51;
	printf("i = %d", i);
	return 0;
}

gcc -c -g testprog.c
gcc -o testprog testprog.o


Thanks,
Mitchell

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

* Re: "Load" problem
  2006-02-13 22:08 "Load" problem Mitchell Fang
@ 2006-02-13 22:22 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2006-02-13 22:22 UTC (permalink / raw)
  To: Mitchell Fang; +Cc: gdb

On Mon, Feb 13, 2006 at 02:08:25PM -0800, Mitchell Fang wrote:
> Has anybody run into this "load" problem before?

Use GDB 6.4 instead, which contains a fix.

> gcc -c -g testprog.c
> gcc -o testprog testprog.o

Might have better luck down the line if you use a PPC cross-compiler
:-)

-- 
Daniel Jacobowitz
CodeSourcery

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

end of thread, other threads:[~2006-02-13 22:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-13 22:08 "Load" problem Mitchell Fang
2006-02-13 22:22 ` Daniel Jacobowitz

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