This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fix gdbserver on ia64
- From: Andreas Schwab <schwab at suse dot de>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 25 Oct 2005 01:47:10 +0200
- Subject: Fix gdbserver on ia64
This patch makes gdbserver on ia64 a bit more useful:
- gdb assumes 462 registers, gdbserver 590 registers, causing a mismatch
on the 'g' packet
- gdb assumes it can send/receive at most the size of a 'g' packet in one
'm' packet, gdbserver was assuming at most 2000 bytes.
Andreas.
2005-10-25 Andreas Schwab <schwab@suse.de>
* regformats/reg-ia64.dat: Remove NAT registers.
gdbserver:
* server.c (main): Allocate mem_buf with PBUFSIZ bytes.
* linux-ia64-low.c (ia64_regmap): Remove NAT registers.
(ia64_num_regs): Reduce to 462.
--- gdb/gdbserver/linux-ia64-low.c.~1.3.~ 2002-04-10 11:08:18.000000000 +0200
+++ gdb/gdbserver/linux-ia64-low.c 2005-10-25 00:57:36.000000000 +0200
@@ -26,7 +26,7 @@
#include <sys/reg.h>
#endif
-#define ia64_num_regs 590
+#define ia64_num_regs 462
#include <asm/ptrace_offsets.h>
@@ -263,24 +263,6 @@ static int ia64_regmap[] =
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1,
- /* nat bits - not fetched directly; instead we obtain these bits from
- either rnat or unat or from memory. */
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
};
static int
--- gdb/gdbserver/server.c.~1.28.~ 2005-07-14 10:09:54.000000000 +0200
+++ gdb/gdbserver/server.c 2005-10-25 01:14:46.000000000 +0200
@@ -322,7 +322,7 @@ int
main (int argc, char *argv[])
{
char ch, status, *own_buf;
- unsigned char mem_buf[2000];
+ unsigned char *mem_buf;
int i = 0;
int signal;
unsigned int len;
@@ -359,6 +359,7 @@ main (int argc, char *argv[])
initialize_low ();
own_buf = malloc (PBUFSIZ);
+ mem_buf = malloc (PBUFSIZ);
if (pid == 0)
{
--- gdb/regformats/reg-ia64.dat.~1.1.~ 2002-02-01 23:05:28.000000000 +0100
+++ gdb/regformats/reg-ia64.dat 2005-10-25 01:04:29.000000000 +0200
@@ -473,131 +473,3 @@ expedite:ip,psr,r12,bsp,cfm
64:
64:
64:
-64:nat0
-64:nat1
-64:nat2
-64:nat3
-64:nat4
-64:nat5
-64:nat6
-64:nat7
-64:nat8
-64:nat9
-64:nat10
-64:nat11
-64:nat12
-64:nat13
-64:nat14
-64:nat15
-64:nat16
-64:nat17
-64:nat18
-64:nat19
-64:nat20
-64:nat21
-64:nat22
-64:nat23
-64:nat24
-64:nat25
-64:nat26
-64:nat27
-64:nat28
-64:nat29
-64:nat30
-64:nat31
-64:nat32
-64:nat33
-64:nat34
-64:nat35
-64:nat36
-64:nat37
-64:nat38
-64:nat39
-64:nat40
-64:nat41
-64:nat42
-64:nat43
-64:nat44
-64:nat45
-64:nat46
-64:nat47
-64:nat48
-64:nat49
-64:nat50
-64:nat51
-64:nat52
-64:nat53
-64:nat54
-64:nat55
-64:nat56
-64:nat57
-64:nat58
-64:nat59
-64:nat60
-64:nat61
-64:nat62
-64:nat63
-64:nat64
-64:nat65
-64:nat66
-64:nat67
-64:nat68
-64:nat69
-64:nat70
-64:nat71
-64:nat72
-64:nat73
-64:nat74
-64:nat75
-64:nat76
-64:nat77
-64:nat78
-64:nat79
-64:nat80
-64:nat81
-64:nat82
-64:nat83
-64:nat84
-64:nat85
-64:nat86
-64:nat87
-64:nat88
-64:nat89
-64:nat90
-64:nat91
-64:nat92
-64:nat93
-64:nat94
-64:nat95
-64:nat96
-64:nat97
-64:nat98
-64:nat99
-64:nat100
-64:nat101
-64:nat102
-64:nat103
-64:nat104
-64:nat105
-64:nat106
-64:nat107
-64:nat108
-64:nat109
-64:nat110
-64:nat111
-64:nat112
-64:nat113
-64:nat114
-64:nat115
-64:nat116
-64:nat117
-64:nat118
-64:nat119
-64:nat120
-64:nat121
-64:nat122
-64:nat123
-64:nat124
-64:nat125
-64:nat126
-64:nat127
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."