Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* RE: gdbserver and arm - please help
@ 2002-04-25 17:23 Kevin "Squail" Endres
  2002-04-25 17:31 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin "Squail" Endres @ 2002-04-25 17:23 UTC (permalink / raw)
  To: 'Daniel Jacobowitz'; +Cc: 'gdb@sources.redhat.com'

I get the same behavior with the current snapshot.

should the below scenario work - or is it still a work in progress.

if it is a work in progress should any remote debugging scenarios work with
the below configurations?

:]k

-----Original Message-----
From: Daniel Jacobowitz [mailto:drow@mvista.com]
Sent: Thursday, April 25, 2002 4:08 PM
To: Kevin Squail Endres
Cc: 'gdb@sources.redhat.com'
Subject: Re: gdbserver and arm - please help


On Thu, Apr 25, 2002 at 04:04:38PM -0700, Kevin Squail Endres wrote:
> i am trying to get gdbserver working on the arm (through applying various
> patches - i can get it to build correctly - but it doesnt function as i
> would expect)
> 
> i386 environment: gdb-5.1.1 crosstargeted for arm binaries (i can read the
> symbol info from the binaries correctly - it works as expected)
> 
> arm: gdbserver built for the arm target with the attached patches applied
(i
> built the full gdb targeted and hosted on the arm - it works correctly on
> the arm) - i also edited config.h in the gdb dir to define the NM file
> (config/arm/nm-linux.h) - it compiles without error.
> 
> when i run a program under gdbserver and target remote via gdb (using TCP)
-
> the connection is formed but i get:
> 
> 0x40002520 in ??() echoed to gdb.
> 
> if i do 'info stack' in gdb
> 
> i get:
> #0 0x40002520 in ??()
> #1 0x0000000 in ??() in gdb
> 
> if i 'step' or 'next':
> 'Cannot find bounds of current function'
> 
> kill terminates the program as expected.
> 
> Any help is appreciated!

Please try a current CVS snapshot.  GDBserver has undergone substantial
work since 5.1.1.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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

* Re: gdbserver and arm - please help
  2002-04-25 17:23 gdbserver and arm - please help Kevin "Squail" Endres
@ 2002-04-25 17:31 ` Daniel Jacobowitz
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-04-25 17:31 UTC (permalink / raw)
  To: Kevin Squail Endres; +Cc: 'gdb@sources.redhat.com'

On Thu, Apr 25, 2002 at 05:23:18PM -0700, Kevin Squail Endres wrote:
> I get the same behavior with the current snapshot.
> 
> should the below scenario work - or is it still a work in progress.
> 
> if it is a work in progress should any remote debugging scenarios work with
> the below configurations?

It should work.  Except, it's not clear what you're trying to do.

Remember, when using gdbserver, at first attach you are at the first
instruction in the program - off in _start somewhere.  Set a breakpoint
at main and continue?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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

* RE: gdbserver and arm - please help
@ 2002-04-25 17:34 Kevin "Squail" Endres
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin "Squail" Endres @ 2002-04-25 17:34 UTC (permalink / raw)
  To: 'Daniel Jacobowitz'; +Cc: 'gdb@sources.redhat.com'

That did it!

much thanks!

:]k
-----Original Message-----
From: Daniel Jacobowitz [mailto:drow@mvista.com]
Sent: Thursday, April 25, 2002 5:31 PM
To: Kevin Squail Endres
Cc: 'gdb@sources.redhat.com'
Subject: Re: gdbserver and arm - please help


On Thu, Apr 25, 2002 at 05:23:18PM -0700, Kevin Squail Endres wrote:
> I get the same behavior with the current snapshot.
> 
> should the below scenario work - or is it still a work in progress.
> 
> if it is a work in progress should any remote debugging scenarios work
with
> the below configurations?

It should work.  Except, it's not clear what you're trying to do.

Remember, when using gdbserver, at first attach you are at the first
instruction in the program - off in _start somewhere.  Set a breakpoint
at main and continue?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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

* Re: gdbserver and arm - please help
  2002-04-25 16:04 Kevin "Squail" Endres
@ 2002-04-25 16:08 ` Daniel Jacobowitz
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-04-25 16:08 UTC (permalink / raw)
  To: Kevin Squail Endres; +Cc: 'gdb@sources.redhat.com'

On Thu, Apr 25, 2002 at 04:04:38PM -0700, Kevin Squail Endres wrote:
> i am trying to get gdbserver working on the arm (through applying various
> patches - i can get it to build correctly - but it doesnt function as i
> would expect)
> 
> i386 environment: gdb-5.1.1 crosstargeted for arm binaries (i can read the
> symbol info from the binaries correctly - it works as expected)
> 
> arm: gdbserver built for the arm target with the attached patches applied (i
> built the full gdb targeted and hosted on the arm - it works correctly on
> the arm) - i also edited config.h in the gdb dir to define the NM file
> (config/arm/nm-linux.h) - it compiles without error.
> 
> when i run a program under gdbserver and target remote via gdb (using TCP) -
> the connection is formed but i get:
> 
> 0x40002520 in ??() echoed to gdb.
> 
> if i do 'info stack' in gdb
> 
> i get:
> #0 0x40002520 in ??()
> #1 0x0000000 in ??() in gdb
> 
> if i 'step' or 'next':
> 'Cannot find bounds of current function'
> 
> kill terminates the program as expected.
> 
> Any help is appreciated!

Please try a current CVS snapshot.  GDBserver has undergone substantial
work since 5.1.1.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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

* gdbserver and arm - please help
@ 2002-04-25 16:04 Kevin "Squail" Endres
  2002-04-25 16:08 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin "Squail" Endres @ 2002-04-25 16:04 UTC (permalink / raw)
  To: 'gdb@sources.redhat.com'

[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

i am trying to get gdbserver working on the arm (through applying various
patches - i can get it to build correctly - but it doesnt function as i
would expect)

i386 environment: gdb-5.1.1 crosstargeted for arm binaries (i can read the
symbol info from the binaries correctly - it works as expected)

arm: gdbserver built for the arm target with the attached patches applied (i
built the full gdb targeted and hosted on the arm - it works correctly on
the arm) - i also edited config.h in the gdb dir to define the NM file
(config/arm/nm-linux.h) - it compiles without error.

when i run a program under gdbserver and target remote via gdb (using TCP) -
the connection is formed but i get:

0x40002520 in ??() echoed to gdb.

if i do 'info stack' in gdb

i get:
#0 0x40002520 in ??()
#1 0x0000000 in ??() in gdb

if i 'step' or 'next':
'Cannot find bounds of current function'

kill terminates the program as expected.

Any help is appreciated!

:]k


[-- Attachment #2: low-linux.patch --]
[-- Type: application/octet-stream, Size: 923 bytes --]

*** insight.orig/insight-5.1.1/gdb/gdbserver/low-linux.c	Wed Jul 25 22:23:58 2001
--- insight/insight-5.1.1/gdb/gdbserver/low-linux.c	Tue Apr 23 18:07:17 2002
***************
*** 24,27 ****
--- 24,28 ----
  #include "frame.h"
  #include "inferior.h"
+ #include "tm.h"
  
  #include <stdio.h>
***************
*** 263,266 ****
--- 264,289 ----
    return (blockend + 4 * regmap[regnum]);
  }
+ //JOE: Add this to enable compilation on arm
+ 
+ #elif defined(ARM_GNULINUX_TARGET)
+ static void
+ initialize_arch (void)
+ {
+   return;
+ }
+ 
+ int
+ arm_linux_register_u_addr (int blockend, int regnum)
+ {
+   return blockend + REGISTER_BYTE (regnum);
+ }
+ 
+ #if !defined (REGISTER_U_ADDR)
+ #define REGISTER_U_ADDR(addr,blockend,regno)  \
+    addr = arm_linux_register_u_addr (blockend, regno)
+ #endif
+ 
+ //END JOE ADD
+ 
  #elif defined(IA64_GNULINUX_TARGET)
  #undef NUM_FREGS

[-- Attachment #3: tm-linux.patch --]
[-- Type: application/octet-stream, Size: 543 bytes --]

*** insight.orig/insight-5.1.1/gdb/config/arm/tm-linux.h	Tue Sep  5 20:39:11 2000
--- insight/insight-5.1.1/gdb/config/arm/tm-linux.h	Tue Apr 23 18:12:07 2002
***************
*** 158,160 ****
--- 158,165 ----
  #define SIGCONTEXT_REGISTER_ADDRESS arm_linux_sigcontext_register_address
  
+ //JOE Add this as described in the patch to support arm compilation
+ /* Define to support ARM Linux in gdbserver/low-linux.c. */
+ #define ARM_GNULINUX_TARGET
+ #define U_REGS_OFFSET 0
+ #undef  HAVE_SYS_REG_H
  #endif /* TM_ARMLINUX_H */

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

end of thread, other threads:[~2002-04-26  0:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-25 17:23 gdbserver and arm - please help Kevin "Squail" Endres
2002-04-25 17:31 ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2002-04-25 17:34 Kevin "Squail" Endres
2002-04-25 16:04 Kevin "Squail" Endres
2002-04-25 16:08 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox