* [Qemu-devel] [PATCH] sparc gdbserver: fix number of regs @ 2009-01-13 15:14 Tristan Gingold 2009-01-13 16:28 ` Blue Swirl 2009-01-13 16:28 ` Blue Swirl 0 siblings, 2 replies; 5+ messages in thread From: Tristan Gingold @ 2009-01-13 15:14 UTC (permalink / raw) To: qemu-devel Hi, gdbstubs.c set the number of regs for sparc32 to 73 but gdb expects only 72. As a consequence, gdb doesn't accept 'g' packets (packets too long). This patch reduces the number of registers to 72. This is harmless as the 72nd register is not used and gdb accepts packets that contains less registers. Tristan. --- gdbstub.c (revision 6277) +++ gdbstub.c (working copy) @@ -694,7 +694,7 @@ #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) #define NUM_CORE_REGS 86 #else -#define NUM_CORE_REGS 73 +#define NUM_CORE_REGS 72 #endif #ifdef TARGET_ABI32 @@ -728,7 +728,7 @@ case 69: GET_REGA(env->npc); case 70: GET_REGA(env->fsr); case 71: GET_REGA(0); /* csr */ - case 72: GET_REGA(0); + default: GET_REGA(0); } #else if (n < 64) { ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] sparc gdbserver: fix number of regs 2009-01-13 15:14 [Qemu-devel] [PATCH] sparc gdbserver: fix number of regs Tristan Gingold @ 2009-01-13 16:28 ` Blue Swirl 2009-01-13 16:28 ` Blue Swirl 1 sibling, 0 replies; 5+ messages in thread From: Blue Swirl @ 2009-01-13 16:28 UTC (permalink / raw) To: qemu-devel On 1/13/09, Tristan Gingold <gingold@adacore.com> wrote: > Hi, > > gdbstubs.c set the number of regs for sparc32 to 73 but gdb expects only > 72. As a consequence, gdb > doesn't accept 'g' packets (packets too long). > This patch reduces the number of registers to 72. This is harmless as the > 72nd register is not used and > gdb accepts packets that contains less registers. Excellent! Now my cross-gdb also works. The patch didn't apply but I fixed it manually and then applied. Maybe Sparc64 has the same problem? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] sparc gdbserver: fix number of regs 2009-01-13 15:14 [Qemu-devel] [PATCH] sparc gdbserver: fix number of regs Tristan Gingold 2009-01-13 16:28 ` Blue Swirl @ 2009-01-13 16:28 ` Blue Swirl 2009-01-13 16:37 ` Tristan Gingold 1 sibling, 1 reply; 5+ messages in thread From: Blue Swirl @ 2009-01-13 16:28 UTC (permalink / raw) To: qemu-devel On 1/13/09, Tristan Gingold <gingold@adacore.com> wrote: > Hi, > > gdbstubs.c set the number of regs for sparc32 to 73 but gdb expects only > 72. As a consequence, gdb > doesn't accept 'g' packets (packets too long). > This patch reduces the number of registers to 72. This is harmless as the > 72nd register is not used and > gdb accepts packets that contains less registers. Excellent! Now my cross-gdb also works. The patch didn't apply but I fixed it manually and then applied. Maybe Sparc64 has the same problem? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] sparc gdbserver: fix number of regs 2009-01-13 16:28 ` Blue Swirl @ 2009-01-13 16:37 ` Tristan Gingold 2009-01-13 18:20 ` Blue Swirl 0 siblings, 1 reply; 5+ messages in thread From: Tristan Gingold @ 2009-01-13 16:37 UTC (permalink / raw) To: qemu-devel On Jan 13, 2009, at 5:28 PM, Blue Swirl wrote: > Excellent! Now my cross-gdb also works. You're welcome. > Maybe Sparc64 has the same problem? I haven't built sparc64 but I can check gdbserver.c with gdb code. Tristan. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] sparc gdbserver: fix number of regs 2009-01-13 16:37 ` Tristan Gingold @ 2009-01-13 18:20 ` Blue Swirl 0 siblings, 0 replies; 5+ messages in thread From: Blue Swirl @ 2009-01-13 18:20 UTC (permalink / raw) To: qemu-devel On 1/13/09, Tristan Gingold <gingold@adacore.com> wrote: > > On Jan 13, 2009, at 5:28 PM, Blue Swirl wrote: > > > > Excellent! Now my cross-gdb also works. > > > > You're welcome. > > > > Maybe Sparc64 has the same problem? > > > > I haven't built sparc64 but I can check gdbserver.c with gdb code. It looks like Sparc64 is correct. The number is defined in gdb sources in gdb/sparc64-tdep.c (SPARC64_NUM_REGS). ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-01-13 18:20 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-01-13 15:14 [Qemu-devel] [PATCH] sparc gdbserver: fix number of regs Tristan Gingold 2009-01-13 16:28 ` Blue Swirl 2009-01-13 16:28 ` Blue Swirl 2009-01-13 16:37 ` Tristan Gingold 2009-01-13 18:20 ` Blue Swirl
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 NNTP newsgroup(s).