aboutsummaryrefslogtreecommitdiff
path: root/linux-user
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 /linux-user
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 'linux-user')
-rw-r--r--linux-user/flatload.c3
-rw-r--r--linux-user/main.c1
-rw-r--r--linux-user/qemu.h3
3 files changed, 7 insertions, 0 deletions
diff --git a/linux-user/flatload.c b/linux-user/flatload.c
index 1e2634b5a2..bf55be2b7d 100644
--- a/linux-user/flatload.c
+++ b/linux-user/flatload.c
@@ -783,6 +783,9 @@ int load_flt_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
info->start_brk = libinfo[0].start_brk;
info->start_stack = sp;
info->entry = start_addr;
+ info->code_offset = info->start_code;
+ info->data_offset = info->start_data - libinfo[0].text_len;
+
DBG_FLT("start_thread(entry=0x%x, start_stack=0x%x)\n",
(int)info->entry, (int)info->start_stack);
diff --git a/linux-user/main.c b/linux-user/main.c
index 49b2166bc3..5b4182bd8b 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1541,6 +1541,7 @@ int main(int argc, char **argv)
memset(ts, 0, sizeof(TaskState));
env->opaque = ts;
ts->used = 1;
+ ts->info = info;
env->user_mode_only = 1;
#if defined(TARGET_I386)
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 9047fcf14e..218e846a0a 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -27,6 +27,8 @@ struct image_info {
unsigned long rss;
unsigned long start_stack;
unsigned long entry;
+ target_ulong code_offset;
+ target_ulong data_offset;
int personality;
};
@@ -73,6 +75,7 @@ typedef struct TaskState {
uint32_t v86mask;
#endif
int used; /* non zero if used */
+ struct image_info *info;
uint8_t stack[0];
} __attribute__((aligned(16))) TaskState;