• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisionbce625cd0d23ff90391d3866a86e4cf401f5d4f3 (tree)
Time2008-06-24 09:50:23
AuthorMichael Snyder <msnyder@vmwa...>
CommiterMichael Snyder

Log Message

2008-06-23 Michael Snyder <msnyder@specifix.com>

* configure.srv: Add configuration for mips64-linux.
* gdbfreeplay-mips64.c: New file, back-end for mips64.

Change Summary

Incremental Difference

--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
1+2008-06-23 Michael Snyder <msnyder@specifix.com>
2+
3+ * configure.srv: Add configuration for mips64-linux.
4+ * gdbfreeplay-mips64.c: New file, back-end for mips64.
5+
16 2008-06-21 Michael Snyder <msnyder@specifix.com>
27
38 * gdbfreeplay-back.c (scan_gdbreplay_file): Add support for 'W'
--- a/gdb/gdbserver/configure.srv
+++ b/gdb/gdbserver/configure.srv
@@ -99,6 +99,7 @@ case "${target}" in
9999 srv_linux_regsets=yes
100100 srv_linux_usrregs=yes
101101 srv_linux_thread_db=yes
102+ freeplay_tgtobj="gdbfreeplay-mips64.o"
102103 ;;
103104 mips*-*-linux*) srv_regobj=mips-linux.o
104105 srv_tgtobj="linux-low.o linux-mips-low.o"
--- /dev/null
+++ b/gdb/gdbserver/gdbfreeplay-mips64.c
@@ -0,0 +1,115 @@
1+/*
2+ * gdbfreeplay-mips64.c
3+ *
4+ * Target-dependent component of gdbfreeplay for mips64.
5+ */
6+
7+#include <stdio.h>
8+#include <stdlib.h>
9+#include <string.h>
10+
11+#include "gdbfreeplay.h"
12+
13+/*
14+ * target_pc_from_T
15+ *
16+ * Extract the PC value from the gdb protocol 'T' packet.
17+ * Returns PC as host unsigned long.
18+ */
19+
20+unsigned long
21+target_pc_from_T (char *tpacket)
22+{
23+ /* Unimplimented -- make caller fall back to using g packet. */
24+ return -1;
25+}
26+
27+/*
28+ * target_pc_from_G
29+ *
30+ * Extract the PC value from the gdb protocol 'G' packet.
31+ * Returns PC as host unsigned long.
32+ */
33+
34+unsigned long
35+target_pc_from_G (char *gpacket)
36+{
37+ char localbuf [24];
38+
39+ if (gpacket[0] == '$' && gpacket[1] == 'G')
40+ {
41+ strncpy (localbuf, gpacket + 592, 8);
42+ localbuf[16] = '\0';
43+ return strtoul (localbuf, NULL, 16);
44+ }
45+
46+ /* Fail -- just assume no legitimate PC will ever be -1... */
47+ return (unsigned long) -1;
48+}
49+
50+/*
51+ * target_pc_from_g
52+ *
53+ * Extract the PC value from the gdb protocol 'g' packet reply.
54+ *
55+ * Unlike the two above, this function accepts a FILE pointer
56+ * rather than a char pointer, and must read data from the file.
57+ *
58+ * Returns PC as host unsigned long.
59+ */
60+
61+unsigned long
62+target_pc_from_g (char *gpacket)
63+{
64+ char localbuf [24];
65+
66+ if (gpacket[0] == 'r' && gpacket[1] == ' ')
67+ {
68+ gpacket += 2;
69+ if (gpacket[0] == '+')
70+ gpacket++;
71+ if (gpacket[0] == '$')
72+ gpacket++;
73+ }
74+
75+ strncpy (localbuf, gpacket + 592, 8);
76+ localbuf[16] = '\0';
77+ return strtoul (localbuf, NULL, 16);
78+}
79+
80+
81+
82+/*
83+ * target_compose_T_packet
84+ *
85+ * On targets where DECR_PC_AFTER_BREAK is zero, this is a no-op.
86+ * We just send back the T packet that was sent to us.
87+ *
88+ */
89+
90+char *
91+target_compose_T_packet (char *origTpacket,
92+ unsigned long instruction_pc,
93+ int breakpoint_p)
94+{
95+ return origTpacket;
96+}
97+
98+
99+
100+/*
101+ * target_compose_g_packet
102+ *
103+ * Take the registers from the 'T' packet, and compose them into a
104+ * 'g' packet response. Registers for which we have no values will
105+ * be filled in with 'xxxx', in the manner of tracepoints.
106+ *
107+ * Returns: string, g packet reply.
108+ */
109+
110+char *
111+target_compose_g_packet (char *tpac)
112+{
113+ /* stub */
114+ return NULL;
115+}