* gdbserver on ixp1200
[not found] <1039308677.1853.ezmlm@sources.redhat.com>
@ 2002-12-07 17:28 ` Chris Gniady
2002-12-07 17:33 ` Daniel Jacobowitz
2002-12-07 20:18 ` Daniel Jacobowitz
0 siblings, 2 replies; 4+ messages in thread
From: Chris Gniady @ 2002-12-07 17:28 UTC (permalink / raw)
To: gdb
Hello,
I have searched all over the web and did not find a clear answer. I am
trying to run gdbserver on ixp1200. It is SA1100 with linux 2.3.99. I
have compiled the gdb 5.2.1 and gdbserver from this distribution. Here
is what happens:
1) FOR GDB configured as "--host=i686-pc-linux-gnu --target=arm-linux"
I when i execute a breakpoint the instruction is simply skipped. My
code is
while(1);
prinf("done\n");
When I set breakpoint at while(1) the printf gets executed. so it is skipped
I am also not able to single step.
2) FOR GDB configured as "--host=i686-pc-linux-gnu --target=arm-elf"
I am able to single step but when I set a breakpoint I get on host:
> Program received signal SIGILL, Illegal instruction.
> 0x02001590 in main (argc=1, argv=0xbffffdc4) at tmmain.c:82
> 82 while(1)
AND on remote:
> Treadmartm (280): undefined instruction: pc=02001590
Can anyone help me with correct configuration or patches, to handle
breakpoints in this configuration.
Thank you,
Chris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdbserver on ixp1200
2002-12-07 17:28 ` gdbserver on ixp1200 Chris Gniady
@ 2002-12-07 17:33 ` Daniel Jacobowitz
2002-12-07 20:18 ` Daniel Jacobowitz
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-12-07 17:33 UTC (permalink / raw)
To: Chris Gniady; +Cc: gdb
On Sat, Dec 07, 2002 at 08:29:14PM -0500, Chris Gniady wrote:
> Hello,
> I have searched all over the web and did not find a clear answer. I am
> trying to run gdbserver on ixp1200. It is SA1100 with linux 2.3.99. I
> have compiled the gdb 5.2.1 and gdbserver from this distribution. Here
> is what happens:
> 1) FOR GDB configured as "--host=i686-pc-linux-gnu --target=arm-linux"
> I when i execute a breakpoint the instruction is simply skipped. My
> code is
>
> while(1);
> prinf("done\n");
>
> When I set breakpoint at while(1) the printf gets executed. so it is skipped
> I am also not able to single step.
>
> 2) FOR GDB configured as "--host=i686-pc-linux-gnu --target=arm-elf"
> I am able to single step but when I set a breakpoint I get on host:
>
> > Program received signal SIGILL, Illegal instruction.
> > 0x02001590 in main (argc=1, argv=0xbffffdc4) at tmmain.c:82
> > 82 while(1)
>
> AND on remote:
> > Treadmartm (280): undefined instruction: pc=02001590
>
> Can anyone help me with correct configuration or patches, to handle
> breakpoints in this configuration.
Don't configure for arm-elf, that won't work.
I need more information on the problem with arm-linux. Would you post
these things:
- output of a gdb session with 'set debug remote 1'
- output of a gdb session with 'set debug target 1'
- output of arm-linux-objdump -d a.out
I do use an arm-linux configured GDB and I haven't had these kinds of
problems with it...
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdbserver on ixp1200
2002-12-07 17:28 ` gdbserver on ixp1200 Chris Gniady
2002-12-07 17:33 ` Daniel Jacobowitz
@ 2002-12-07 20:18 ` Daniel Jacobowitz
[not found] ` <3DF32223.3090306@ecn.purdue.edu>
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-12-07 20:18 UTC (permalink / raw)
To: Chris Gniady; +Cc: gdb
[-- Attachment #1: Type: text/plain, Size: 2060 bytes --]
On Sat, Dec 07, 2002 at 08:29:14PM -0500, Chris Gniady wrote:
> Hello,
> I have searched all over the web and did not find a clear answer. I am
> trying to run gdbserver on ixp1200. It is SA1100 with linux 2.3.99. I
> have compiled the gdb 5.2.1 and gdbserver from this distribution. Here
> is what happens:
> 1) FOR GDB configured as "--host=i686-pc-linux-gnu --target=arm-linux"
> I when i execute a breakpoint the instruction is simply skipped. My
> code is
>
> while(1);
> prinf("done\n");
>
> When I set breakpoint at while(1) the printf gets executed. so it is skipped
> I am also not able to single step.
>
> 2) FOR GDB configured as "--host=i686-pc-linux-gnu --target=arm-elf"
> I am able to single step but when I set a breakpoint I get on host:
>
> > Program received signal SIGILL, Illegal instruction.
> > 0x02001590 in main (argc=1, argv=0xbffffdc4) at tmmain.c:82
> > 82 while(1)
>
> AND on remote:
> > Treadmartm (280): undefined instruction: pc=02001590
>
> Can anyone help me with correct configuration or patches, to handle
> breakpoints in this configuration.
For 1), I can't tell you anything offhand but it sounds similar to a
bug fixed recently (2002-11-17 in CVS). If it was the same as the
binary you sent me then it's some new problem, I don't know what.
I've attached the patch for the first problem for you to try if you
want.
In the session you sent me, the breakpoint on the while loop was
skipped because the breakpoint went on the beginning of the while loop,
and the loop was already running when you sent it.
Beyond that, you are configured for "arm-linux". "arm-linux" is a
little-endian configuration. The binary you sent me was elf32-bigarm,
I.E. you're using a big-endian strongarm. GDB doesn't support that.
I have patches for this but I haven't gotten around to submitting them
yet.... the patch you should need is attached, and then configure for
armeb-linux (I think).
Give 'em a try.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
[-- Attachment #2: gdb-5.2-arm-gdbserver.patch --]
[-- Type: text/plain, Size: 1340 bytes --]
Source: Community and MontaVista Software, Inc.
Description:
Return the status register, so that single-stepping over conditional
branches works correctly on ARM.
2002-11-17 Stuart Hughes <seh@zee2.com>
* linux-arm-low.c (arm_num_regs): Increase.
(arm_regmap): Include status register.
2002-11-17 Daniel Jacobowitz <drow@mvista.com>
* linux-low.c (register_addr): Remove incorrect -1 check.
diff -ur gdb-5.2.1/gdb/gdbserver.bak/linux-arm-low.c gdb-5.2.1/gdb/gdbserver/linux-arm-low.c
--- gdb-5.2.1/gdb/gdbserver.bak/linux-arm-low.c 2002-10-28 17:20:19.000000000 -0500
+++ gdb-5.2.1/gdb/gdbserver/linux-arm-low.c 2002-11-17 19:48:42.000000000 -0500
@@ -26,11 +26,13 @@
#include <sys/reg.h>
#endif
-#define arm_num_regs 16
+#define arm_num_regs 26
static int arm_regmap[] = {
0, 4, 8, 12, 16, 20, 24, 28,
32, 36, 40, 44, 48, 52, 56, 60,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 64
};
static int
diff -ur gdb-5.2.1/gdb/gdbserver.bak/linux-low.c gdb-5.2.1/gdb/gdbserver/linux-low.c
--- gdb-5.2.1/gdb/gdbserver.bak/linux-low.c 2002-10-28 17:20:20.000000000 -0500
+++ gdb-5.2.1/gdb/gdbserver/linux-low.c 2002-11-17 19:48:42.000000000 -0500
@@ -1120,8 +1120,6 @@
error ("Invalid register number %d.", regnum);
addr = the_low_target.regmap[regnum];
- if (addr == -1)
- addr = 0;
return addr;
}
[-- Attachment #3: gdb-5.2-arm-be.patch --]
[-- Type: text/plain, Size: 788 bytes --]
--- gdb-5.2/gdb/arm-linux-tdep.c.orig Mon Jul 15 20:28:30 2002
+++ gdb-5.2/gdb/arm-linux-tdep.c Mon Jul 15 20:31:24 2002
@@ -45,6 +45,8 @@
static const char arm_linux_arm_le_breakpoint[] = {0x01,0x00,0x9f,0xef};
+static const char arm_linux_arm_be_breakpoint[] = {0xef, 0x9f, 0x00, 0x01};
+
/* CALL_DUMMY_WORDS:
This sequence of words is the instructions
@@ -723,7 +725,10 @@
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
tdep->lowest_pc = 0x8000;
- tdep->arm_breakpoint = arm_linux_arm_le_breakpoint;
+ if (info.byte_order == BFD_ENDIAN_BIG)
+ tdep->arm_breakpoint = arm_linux_arm_be_breakpoint;
+ else
+ tdep->arm_breakpoint = arm_linux_arm_le_breakpoint;
tdep->arm_breakpoint_size = sizeof (arm_linux_arm_le_breakpoint);
tdep->jb_pc = JB_PC;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdbserver on ixp1200
[not found] ` <3DF32223.3090306@ecn.purdue.edu>
@ 2002-12-08 2:47 ` Chris Gniady
0 siblings, 0 replies; 4+ messages in thread
From: Chris Gniady @ 2002-12-08 2:47 UTC (permalink / raw)
Cc: gdb
Daniel,
That was it. Thank you!!!!!
Once I saw your patch for the big endian, I realized the problem. I have
seen the breakpoint instruction mentioned on other sites, but did not
cross my mind to look that it may be in little endian order.
Thanks again,
Chris
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-12-08 10:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1039308677.1853.ezmlm@sources.redhat.com>
2002-12-07 17:28 ` gdbserver on ixp1200 Chris Gniady
2002-12-07 17:33 ` Daniel Jacobowitz
2002-12-07 20:18 ` Daniel Jacobowitz
[not found] ` <3DF32223.3090306@ecn.purdue.edu>
2002-12-08 2:47 ` Chris Gniady
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox