summaryrefslogtreecommitdiff
path: root/gdbstub.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-06-17 18:30:42 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-06-17 18:30:42 +0000
commit978efd6aac65bc1e025472859eb738839425318b (patch)
treea1aaafb0c7f76db35adbc561da300525c635a6ae /gdbstub.c
parente6de1bad4619dbbc40938449a53c4c27c418fdc6 (diff)
Respond to qOffsets gdb packet (for debugging bFLT binaries).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1986 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'gdbstub.c')
-rw-r--r--gdbstub.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdbstub.c b/gdbstub.c
index 1b93cf4ba..37241ce58 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -17,6 +17,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "config.h"
#ifdef CONFIG_USER_ONLY
#include <stdlib.h>
#include <stdio.h>
@@ -24,6 +25,7 @@
#include <string.h>
#include <errno.h>
#include <unistd.h>
+#include <fcntl.h>
#include "qemu.h"
#else
@@ -680,6 +682,18 @@ static int gdb_handle_packet(GDBState *s, CPUState *env, const char *line_buf)
goto breakpoint_error;
}
break;
+#ifdef CONFIG_USER_ONLY
+ case 'q':
+ if (strncmp(p, "Offsets", 7) == 0) {
+ TaskState *ts = env->opaque;
+
+ sprintf(buf, "Text=%x;Data=%x;Bss=%x", ts->info->code_offset,
+ ts->info->data_offset, ts->info->data_offset);
+ put_packet(s, buf);
+ break;
+ }
+ /* Fall through. */
+#endif
default:
// unknown_command:
/* put empty packet */