Commit Graph

376 Commits

Author SHA1 Message Date
Jan Kiszka 84273177f2 gdbstub: x86: Support for setting segment registers
This allows to set segment registers via gdb also in system emulation
mode. Basic sanity checks are applied and nothing is changed if they
fail. But screwing up the target via this interface will never be
complicated, so I avoided being too paranoid here.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16 08:28:13 -05:00
Jan Kiszka b1631e7a6f gdbstub: x86: Refactor register access
Clarify gdb's register set layout by using constants for
cpu_gdb_read/write_register.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16 08:28:13 -05:00
Jan Kiszka dd32aa1047 gdbstub: Add vCont support
This patch adds support for the vCont remote gdb command. It is used by
gdb 6.8 or better to switch the debugging focus for single-stepping
multi-threaded targets, ie. multi-threaded application in user mode
emulation or VCPUs in system emulation.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16 08:28:13 -05:00
Nathan Froyd 1e9fa73016 fix gdbstub support for multiple threads in usermode, v3
When debugging multi-threaded programs, QEMU's gdb stub would report the
correct number of threads (the qfThreadInfo and qsThreadInfo packets).
However, the stub was unable to actually switch between threads (the T
packet), since it would report every thread except the first as being
dead.  Furthermore, the stub relied upon cpu_index as a reliable means
of assigning IDs to the threads.  This was a bad idea; if you have this
sequence of events:

initial thread created
new thread #1
new thread #2
thread #1 exits
new thread #3

thread #3 will have the same cpu_index as thread #1, which would confuse
GDB.  (This problem is partly due to the remote protocol not having a
good way to send thread creation/destruction events.)

We fix this by using the host thread ID for the identifier passed to GDB
when debugging a multi-threaded userspace program.  The thread ID might
wrap, but the same sort of problems with wrapping thread IDs would come
up with debugging programs natively, so this doesn't represent a
problem.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
2009-06-04 10:04:49 +01:00
Edgar E. Iglesias d74d6a99a0 microblaze: Add GDB stub support.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-26 21:11:04 +02:00
blueswir1 654efcf3ed Add 'static' to avoid a sparse warning
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7175 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-18 07:29:59 +00:00
blueswir1 2dc766dafc Fix ppc-softmmu warnings on OpenBSD host
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7099 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-13 16:06:19 +00:00
aurel32 fab9d28414 factor out setting pc in gdbstub
The code for handling the c and s packets both contain code for setting
the pc.  Move that code out to a common function.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7039 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-08 21:29:37 +00:00
aliguori 59030a8cd4 gdbstub: Rework configuration via command line and monitor (Jan Kiszka)
Introduce a more canonical gdbstub configuration (system emulation only)
via the new switch '-gdb dev'. Keep '-s' as shorthand for
'-gdb tcp::1234'. Use the same syntax also for the corresponding monitor
command 'gdbserver'. Its default remains to listen on TCP port 1234.

Changes in v4:
 - Rebased over new command line switches meta file

Changes in v3:
 - Fix documentation

Changes in v2:
 - Support for pipe-based like to gdb (target remote | qemu -gdb stdio)
 - Properly update the qemu-doc

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6992 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-05 18:43:41 +00:00
aliguori 36556b20c5 gdbstub: Allow re-instantiation (Jan Kiszka)
[ Note: depends on char closing fixes ]

Properly clean up the gdbstub when the user tries to re-open it
(possibly under a different address). Moreover, allow to shut it down
from the monitor via 'gdbserver none'.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6913 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28 18:05:53 +00:00
aliguori 0fe17f5efb gdbstub: Drop redundant memset after qemu_mallocz (Jan Kiszka)
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6897 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28 17:28:49 +00:00
aliguori e22a25c936 Guest debugging support for KVM (Jan Kiszka)
This is a backport of the guest debugging support for the KVM
accelerator that is now part of the KVM tree. It implements the reworked
KVM kernel API for guest debugging (KVM_CAP_SET_GUEST_DEBUG) which is
not yet part of any mainline kernel but will probably be 2.6.30 stuff.
So far supported is x86, but PPC is expected to catch up soon.

Core features are:
 - unlimited soft-breakpoints via code patching
 - hardware-assisted x86 breakpoints and watchpoints

Changes in this version:
 - use generic hook cpu_synchronize_state to transfer registers between
   user space and kvm
 - push kvm_sw_breakpoints into KVMState

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6825 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-12 20:12:48 +00:00
aurel32 3098dba01c Use a dedicated function to request exit from execution loop
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6762 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-07 21:28:24 +00:00
blueswir1 0b8a988c5d Fix BSD user
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6734 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-07 10:51:36 +00:00
aliguori 8a34a0fb03 monitor: Pass-through for gdbstub (Jan Kiszka)
Create a monitor terminal and pass it through the gdbstub. This allows
to use gdb's monitor command to access the QEMU monitor. Works for all
commands except for non-detached migration and password retrieval (user
will receive error messages instead).

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6718 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-05 23:01:55 +00:00
aliguori 1eec614b36 toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-05 22:06:18 +00:00
aurel32 e571cb477b target-ppc: Change core powerpc gdbstub bits to be XML-aware
Define GDB_CORE_XML and hack things similarly to ARM so that despite the
FP registers coming in between the GPRs and some status registers,
everything works out OK no matter which kind of GDB we're communicating
with.

It matters whether we're built to target 64-bit or 32-bit cores.  I
think there are still problems if we are debugging 32-bit programs on a
built-for-64-bit QEMU (QEMU will always send 64-bit registers), but I
don't know if there's a good way around that at the time being.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6421 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-24 15:07:42 +00:00
aliguori 9781e0401a Rework vm_state_change notifiers (Jan Kiszka)
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6402 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-22 17:15:29 +00:00
aurel32 ceecf1d158 add an init function parameter to qemu_chr_open()
And use it for the malta emulation. Fix segfault introduced in
revision 6352.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6365 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-18 14:08:04 +00:00
blueswir1 c72d5bf87e Fix bsd-user build
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6312 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-15 17:27:45 +00:00
blueswir1 5a37791249 Fix gdbserver number of registers (Tristan Gingold)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6280 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-13 16:28:01 +00:00
edgar_igl 9f6164d6f6 gdbstub: fix gdbserver_fork
As reported by Martin Mohring fork doesn't work with NPTL.
A fix is attached that makes the also attached test run
(tested with ARM CodeSourcery 2008q3 on an x86_64
Fedora Core with kernel 2.6.23).

Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6195 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-07 10:22:28 +00:00
aurel32 fad6cb1a56 Update FSF address in GPL/LGPL boilerplate
The attached patch updates the FSF address in the GPL/LGPL boilerplate
in most GPL/LGPLed files, and also in COPYING.LIB.

Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6162 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-04 22:05:52 +00:00
aurel32 ca587a8ebd User-mode GDB stub improvements - handle signals
Handle signals in the user-mode GDB stub.  Report them to GDB, and
allow it to change or cancel them.  Also correct the protocol numbering;
it happens to match Linux numbering for SIGINT and SIGTRAP, but that's
just good fortune.

Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6096 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-18 22:44:13 +00:00
aurel32 2b1319c85c User-mode GDB stub improvements - handle fork
Close gdbserver in child processes, so that only one stub tries to talk
to GDB at a time.  Updated from an earlier patch by Paul Brook.

Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6095 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-18 22:44:04 +00:00
aurel32 19bf517b7f target-alpha: gdb-stub support
(Vince Weaver)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5945 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-07 23:26:32 +00:00
aurel32 3faf778e9d gdbstub: kill a warning
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5943 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-07 23:26:17 +00:00
blueswir1 69d6451c3e Fix some new warnings introduced after r5022
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5933 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-07 19:30:18 +00:00
aurel32 8d4acf9b90 gdbstub: Fix access to PPC FPRs
Obviously, someone forgot to rebase the index before accessing one of
the 32 FPRs.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5821 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-30 16:23:18 +00:00
aliguori 880a757838 gdbstub: manage CPUs as threads (Jan Kiszka)
This patch enhances QEMU's built-in debugger for SMP guest debugging.
Using the thread support of the gdb remote protocol, each VCPU is mapped
on a pseudo thread and exposed to the gdb frontend. This way you can
easy switch the focus of gdb between the VCPUs and observe their states.
On breakpoint hit, the focus is automatically adjusted just as for
normal multi-threaded application under gdb control.

Furthermore, the patch propagates breakpoint and watchpoint insertions
or removals to all CPUs, not just the current one as it was the case so
far. Without this, SMP guest debugging was practically unfeasible.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5743 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-18 20:30:24 +00:00
aliguori a1d1bb3101 Refactor and enhance break/watchpoint API (Jan Kiszka)
This patch prepares the QEMU cpu_watchpoint/breakpoint API to allow the
succeeding enhancements this series comes with.

First of all, it overcomes MAX_BREAKPOINTS/MAX_WATCHPOINTS by switching
to dynamically allocated data structures that are kept in linked lists.
This also allows to return a stable reference to the related objects,
required for later introduced x86 debug register support.

Breakpoints and watchpoints are stored with their full information set
and an additional flag field that makes them easily extensible for use
beyond pure guest debugging.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5738 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-18 20:07:32 +00:00
aliguori d6fc1b397b gdbstub: Return appropriate watch message to gdb (Jan Kiszka)
Return the appropriate type prefix (r, a, none) when reporting
watchpoint hits to the gdb front-end.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5737 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-18 19:55:44 +00:00
aliguori 5ccfae10a7 Implement "info chardev" command. (Gerd Hoffmann)
This patch makes qemu keep track of the character devices in use and
implements a "info chardev" monitor command to print a list.

qemu_chr_open() sticks the devices into a linked list now.  It got a new
argument (label), so there is a name for each device.  It also assigns a
filename to each character device.  By default it just copyes the
filename passed in.  Individual drivers can fill in something else
though.  qemu_chr_open_pty() sets the filename to name of the pseudo tty
allocated.

Output looks like this:

  (qemu) info chardev
  monitor: filename=unix:/tmp/run.sh-26827/monitor,server,nowait
  serial0: filename=unix:/tmp/run.sh-26827/console,server
  serial1: filename=pty:/dev/pts/5
  parallel0: filename=vc:640x480

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5575 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-31 17:31:29 +00:00
blueswir1 5b3715bfda Use snprintf to please OpenBSD linker
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5529 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-25 11:18:12 +00:00
aurel32 3d7b417e13 target-ppc: Convert XER accesses to TCG
Define XER bits as a single register and access them individually to
avoid defining 5 32-bit registers (TCG doesn't permit to map 8-bit
registers).

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5500 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-21 11:28:46 +00:00
aurel32 064f6633d6 gdbstub: remove unused local variable
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5489 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-14 19:23:35 +00:00
edgar_igl d7b6967af4 CRIS: Handle GDB writes to pregs.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5461 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-11 19:32:21 +00:00
pbrook 56aebc8916 Add GDB XML register description support.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5459 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-11 17:55:29 +00:00
ths f01be15458 Move the active FPU registers into env again, and use more TCG registers
to access them.

Signed-off-by: Thiemo Seufer <ths@networkno.de>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5252 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-18 11:57:27 +00:00
blueswir1 7ccfb2eb5f Fix warnings that would be caused by gcc flag -Wwrite-strings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5206 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-14 06:45:34 +00:00
blueswir1 363a37d520 Fix OpenBSD linker warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5044 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-21 17:58:08 +00:00
ths b5dc7732e1 More efficient target register / TC accesses.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4794 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-27 10:02:35 +00:00
pbrook 0f459d16c3 Clean up MMIO TLB handling.
The IO index is now stored in its own field, instead of being wedged
into the vaddr field.  This eliminates the ROMD and watchpoint host
pointer weirdness.  The IO index space is expanded by 1 bit, and
several additional bits are made available in the TLB vaddr field.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4704 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-09 00:20:13 +00:00
blueswir1 96d1912622 Fix Sparc32plus GDBstub support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4689 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-07 08:03:05 +00:00
edgar_igl 1f487ee9b8 Support signal reception in user-mode. Handle when the peer terminates or aborts the connection.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4483 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-17 22:20:53 +00:00
edgar_igl 7d03f82f81 Add support for the 'k' (kill) and 'D' (detach) packets (Jason Wessel).
Implement the 'k' gdbserial packet which kills the qemu instance via
the debugger stub.

Implement the 'D' detach packet for the gdb stub such that you can
disconnect gdb with the "detach" command.  This required implementing
a cpu_breakpoint_remove_all() and a cpu_watchpoint_remove_all()
function to cleanup all the breakpoints and watchpoints prior to
leaving the gdb stub else simulation can stop with no debugger
attached.

On a '?' packet remove all the breakpoints and watchpoints.  This is
considered more of a safety net in case you force killed gdb or it
crashed and you are reconnecting.  The identical behavior exists for
kgdb in the linux kernel.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4478 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-17 18:58:29 +00:00
bellard 798085733c x86_64 and better i386 support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4394 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-09 14:40:22 +00:00
edgar_igl fde3fd6184 Remove x86-64 specific reg fillers.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4392 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-09 08:50:01 +00:00
edgar_igl 60897d369f Debugger single step without interrupts (Jason Wessel).
This patch allows the qemu backend debugger to single step an
instruction without running the hardware interrupts.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4391 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-09 08:25:14 +00:00
edgar_igl c584116612 Add x86_64 gdb stub for qemu (Jason Wessel).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4390 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-09 08:23:19 +00:00
edgar_igl ba70a624e9 Improve readability by moving the continue operation into aseparate function.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4059 c046a42c-6fe2-441c-8c8c-71466251a162
2008-03-14 06:10:42 +00:00
edgar_igl 9004627f9b More consistent naming for CRIS register-number macros.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3996 c046a42c-6fe2-441c-8c8c-71466251a162
2008-02-28 08:28:32 +00:00
ths d0dc7dc327 Make MIPS MT implementation more cache friendly.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3981 c046a42c-6fe2-441c-8c8c-71466251a162
2008-02-12 21:01:26 +00:00
ths ffe8ab83da Fix char* signedness, by Andre Przywara.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3816 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-16 03:16:05 +00:00
ths 60fe76f386 Fix wrong signedness, by Andre Przywara.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3815 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-16 03:02:09 +00:00
pbrook 87ecb68bdf Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-17 17:14:51 +00:00
pbrook cd04168106 Fix format mismatch.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3589 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-11 14:52:02 +00:00
balrog 5ad265ee5b x86_64 support in cpu_gdb_read_registers(), by Goran Weinholt.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3491 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-31 00:21:35 +00:00
j_mayer 0411a97258 Gprof prooved the PowerPC emulation spent too much time in MSR load and store
routines. Coming back to a raw MSR storage model then speed-up the emulation.
Improve fast MSR updates (wrtee wrteei and mtriee cases).
Share rfi family instructions helpers code to avoid bug in duplicated code.
Allow entering halt mode as the result of a rfi instruction.
Add a new helper_regs.h file to avoid duplication of special registers
 manipulation routines (currently XER and MSR).


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3436 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-25 21:35:50 +00:00
ths 7ac256b872 Fix gdb stub for MIPS64.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3435 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-25 21:30:37 +00:00
ths f1ccf90477 CRIS support in toplevel, by Edgar E. Iglesias.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3363 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-08 13:16:14 +00:00
ths 3b46e62427 find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-17 08:09:54 +00:00
ths 5fafdf24ef find -type f | xargs sed -i 's/[\t ]$//g' # on most files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-16 21:08:06 +00:00
ths ead9360e2f Partial support for 34K multithreading, not functional yet.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3156 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-06 00:18:15 +00:00
pbrook 8a93e02a93 Ensure string is properly terminated.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3113 c046a42c-6fe2-441c-8c8c-71466251a162
2007-08-06 13:19:15 +00:00
ths 8fac5803a9 Improve handling of gdb's single-step / continue arguments.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3075 c046a42c-6fe2-441c-8c8c-71466251a162
2007-07-12 10:05:07 +00:00
ths aa1f17c18d Spelling fixes, by Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3066 c046a42c-6fe2-441c-8c8c-71466251a162
2007-07-11 22:48:58 +00:00
blueswir1 17d996e1f1 Report normalised CWP values to userland and GDB, not internal representation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3052 c046a42c-6fe2-441c-8c8c-71466251a162
2007-07-07 20:53:22 +00:00
ths fe834d041d Proper target format for qOffsets.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2934 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-03 17:08:32 +00:00
ths 2052caa7af GDB stub for MIPS64, by Jason Wessel.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2909 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-01 13:18:19 +00:00
pbrook a87295e8df M68k system mode semihosting.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2861 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-26 15:09:38 +00:00
ths 6ef99fc59c Add fpu register support to the gdb code, by Magnus Damm.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2817 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-13 16:36:24 +00:00
ths 5a5012ecbd MIPS 64-bit FPU support, plus some collateral bugfixes in the
conditional branch handling.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2779 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-07 13:55:33 +00:00
pbrook aa6290b7e5 Fix format specified for watchpoint address.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2667 c046a42c-6fe2-441c-8c8c-71466251a162
2007-04-14 22:35:50 +00:00
blueswir1 8979596d17 Fix Sparc64 double float gdb protocol (initial version by Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2666 c046a42c-6fe2-441c-8c8c-71466251a162
2007-04-14 16:15:48 +00:00
pbrook 6658ffb81e Watchpoint support (previous commit got eaten by Savannah server crash).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2479 c046a42c-6fe2-441c-8c8c-71466251a162
2007-03-16 23:58:11 +00:00
j_mayer 76a66253e5 Great PowerPC emulation code resynchronisation and improvments:
- Add status file to make regression tracking easier
- Move all micro-operations helpers definitions into a separate header:
  should never be seen outside of op.c
- Update copyrights
- Add new / missing PowerPC CPU definitions
- Add definitions for PowerPC BookE
- Add support for PowerPC 6xx/7xx software driven TLBs
  Allow use of PowerPC 603 as an example
- Add preliminary code for POWER, POWER2, PowerPC 403, 405, 440, 601, 602
  and BookE support
- Avoid compiling priviledged only resources support for user-mode emulation
- Remove unused helpers / micro-ops / dead code
- Add instructions usage statistics dump: useful to figure which instructions
  need strong optimizations.
- Micro-operation fixes:
  * add missing RETURN in some micro-ops
  * fix prototypes
  * use softfloat routines for all floating-point operations
  * fix tlbie instruction
  * move some huge micro-operations into helpers
- emulation fixes:
  * fix inverted opcodes for fcmpo / fcmpu
  * condition register update is always to be done after the whole
    instruction has completed
  * add missing NIP updates when calling helpers that may generate an
    exception
- optimizations and improvments:
  * optimize very often used instructions (li, mr, rlwixx...)
  * remove specific micro-ops for rarely used instructions
  * add routines for addresses computations to avoid bugs due to multiple
    different implementations
  * fix TB linking: do not reset T0 at the end of every TB.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2473 c046a42c-6fe2-441c-8c8c-71466251a162
2007-03-07 08:32:30 +00:00
ths 36d2395873 MIPS FPU dynamic activation, part 1, by Herve Poussineau.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2463 c046a42c-6fe2-441c-8c8c-71466251a162
2007-02-28 22:37:42 +00:00
pbrook cfc3475a8d Allow gdbstub to connect over any serial device.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2448 c046a42c-6fe2-441c-8c8c-71466251a162
2007-02-22 01:48:01 +00:00
bellard c636bb66cc gdbserver fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2393 c046a42c-6fe2-441c-8c8c-71466251a162
2007-02-05 20:46:05 +00:00
pbrook a2d1ebaf89 GDB hosted syscalls.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2364 c046a42c-6fe2-441c-8c8c-71466251a162
2007-01-28 03:10:55 +00:00
pbrook 4046d9130e Use standard character device interface for gdbstub.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2363 c046a42c-6fe2-441c-8c8c-71466251a162
2007-01-28 01:53:16 +00:00
pbrook 3c07f8e894 Don't resume guest when gdb connection terminates and -S specified.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2343 c046a42c-6fe2-441c-8c8c-71466251a162
2007-01-21 16:47:01 +00:00
ths 831b78254c Darwin userspace emulation, by Pierre d'Herbemont.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2332 c046a42c-6fe2-441c-8c8c-71466251a162
2007-01-18 20:06:33 +00:00
ths 8e33c08c84 MIPS FPU support for the gdb stub, by Daniel Jacobowitz.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2242 c046a42c-6fe2-441c-8c8c-71466251a162
2006-12-11 19:22:27 +00:00
pbrook e6e5906b6e ColdFire target.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2196 c046a42c-6fe2-441c-8c8c-71466251a162
2006-10-22 00:18:54 +00:00
bellard 9d9754a31d sparc fpu fix - allow 64 bit addresses (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2009 c046a42c-6fe2-441c-8c8c-71466251a162
2006-06-25 15:32:37 +00:00
pbrook 9c2a9ea1b1 SH bugfixes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1991 c046a42c-6fe2-441c-8c8c-71466251a162
2006-06-18 19:12:54 +00:00
pbrook 978efd6aac 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
2006-06-17 18:30:42 +00:00
bellard 8f447cc753 gdb stub for win32
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1972 c046a42c-6fe2-441c-8c8c-71466251a162
2006-06-14 15:21:14 +00:00
bellard fdf9b3e831 sh4 target (Samuel Tardieu)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1861 c046a42c-6fe2-441c-8c8c-71466251a162
2006-04-27 21:07:38 +00:00
bellard bbeb7b5cbd SIGINT generation (Jason Wessel)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1836 c046a42c-6fe2-441c-8c8c-71466251a162
2006-04-23 18:42:15 +00:00
bellard 6f970bd90e MIPS support and memory access error reporting (Daniel Jacobowitz)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1685 c046a42c-6fe2-441c-8c8c-71466251a162
2005-12-05 19:55:19 +00:00
bellard b5ff1b3127 ARM system emulation (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1661 c046a42c-6fe2-441c-8c8c-71466251a162
2005-11-26 10:38:39 +00:00
bellard 6a00d60127 SMP support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1640 c046a42c-6fe2-441c-8c8c-71466251a162
2005-11-21 23:25:50 +00:00
bellard 7c9d8e07e1 new network emulation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1622 c046a42c-6fe2-441c-8c8c-71466251a162
2005-11-15 22:16:05 +00:00
bellard 48b2c19353 sparc fix (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1572 c046a42c-6fe2-441c-8c8c-71466251a162
2005-10-30 16:08:23 +00:00
bellard 3fc6c082e3 preliminary patch to support more PowerPC CPUs (Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1489 c046a42c-6fe2-441c-8c8c-71466251a162
2005-07-02 20:59:34 +00:00
bellard 3475187dd8 sparc64 marge (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1462 c046a42c-6fe2-441c-8c8c-71466251a162
2005-07-02 14:31:34 +00:00
bellard 905f20b151 fixed gdb error reporting (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1407 c046a42c-6fe2-441c-8c8c-71466251a162
2005-04-26 21:09:55 +00:00
bellard e90096763d report user mode gdb exit codes (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1401 c046a42c-6fe2-441c-8c8c-71466251a162
2005-04-26 20:42:36 +00:00
bellard 4162503368 removed RS_CONTINUE 'state'
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1389 c046a42c-6fe2-441c-8c8c-71466251a162
2005-04-24 10:07:11 +00:00
bellard 1fddef4b1b gdb support for user mode (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1367 c046a42c-6fe2-441c-8c8c-71466251a162
2005-04-17 19:16:13 +00:00
bellard b328f873ab gdb M packet parsing fix (Thomas Petazzoni)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1227 c046a42c-6fe2-441c-8c8c-71466251a162
2005-01-17 22:03:16 +00:00
bellard 612458f544 removed warning
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1188 c046a42c-6fe2-441c-8c8c-71466251a162
2005-01-03 23:34:06 +00:00
bellard e80cfcfc88 SPARC merge
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1179 c046a42c-6fe2-441c-8c8c-71466251a162
2004-12-19 23:18:01 +00:00
bellard 8d5f07fa3b sparc merge (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1098 c046a42c-6fe2-441c-8c8c-71466251a162
2004-10-04 21:23:09 +00:00
bellard e95c8d51c2 full system SPARC emulation (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1087 c046a42c-6fe2-441c-8c8c-71466251a162
2004-09-30 22:22:08 +00:00
bellard 7d3505c55a bsd port (Markus Niemisto)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@800 c046a42c-6fe2-441c-8c8c-71466251a162
2004-05-12 19:32:15 +00:00
bellard a541f297a3 PowerPC system emulation fixes (Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@722 c046a42c-6fe2-441c-8c8c-71466251a162
2004-04-12 20:39:29 +00:00
bellard 67b915a5dd win32 port (initial patch by kazu)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@692 c046a42c-6fe2-441c-8c8c-71466251a162
2004-03-31 23:37:16 +00:00
bellard 858693c638 moved gdbstub to qemu - new asynchronous gdbstub
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@686 c046a42c-6fe2-441c-8c8c-71466251a162
2004-03-31 18:52:07 +00:00
bellard f193c7979c do not depend on thunk.h - more log items
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@675 c046a42c-6fe2-441c-8c8c-71466251a162
2004-03-21 17:06:25 +00:00
bellard 8b1f24b090 new physical memory access API (used by DMA accesses)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@645 c046a42c-6fe2-441c-8c8c-71466251a162
2004-02-25 23:24:38 +00:00
bellard 13eb76e091 virtual memory access for gdbstub
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@581 c046a42c-6fe2-441c-8c8c-71466251a162
2004-01-24 15:23:36 +00:00
bellard 9e62fd7f26 ppc support (Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@546 c046a42c-6fe2-441c-8c8c-71466251a162
2004-01-05 22:49:06 +00:00
bellard 5be1a8e065 ppc fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@533 c046a42c-6fe2-441c-8c8c-71466251a162
2004-01-04 23:51:58 +00:00
bellard 2ddbbd10de (temporary) only physical dump is possible in gdb
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@519 c046a42c-6fe2-441c-8c8c-71466251a162
2004-01-04 18:07:27 +00:00
bellard 6da41eafc4 added CPU callbacks
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@493 c046a42c-6fe2-441c-8c8c-71466251a162
2004-01-04 15:48:38 +00:00
bellard 03a6c5103d cannot simply write segment registers in system mode
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@431 c046a42c-6fe2-441c-8c8c-71466251a162
2003-10-30 01:07:22 +00:00
bellard 3486513433 log activation from gdb - gdb single step support for x86 - stop timer when cpu is being debugged
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@402 c046a42c-6fe2-441c-8c8c-71466251a162
2003-10-05 14:28:56 +00:00
bellard 6180a1818a new directory structure
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@391 c046a42c-6fe2-441c-8c8c-71466251a162
2003-09-30 21:04:53 +00:00
bellard c33a346edf first part of single stepping support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@342 c046a42c-6fe2-441c-8c8c-71466251a162
2003-07-29 20:50:33 +00:00
bellard 4abe615b84 removed debug
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@336 c046a42c-6fe2-441c-8c8c-71466251a162
2003-07-26 18:01:58 +00:00
bellard 4c3a88a284 gdb stub breakpoints support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@332 c046a42c-6fe2-441c-8c8c-71466251a162
2003-07-26 12:06:08 +00:00
bellard b4608c0455 added gdb support to vl
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@288 c046a42c-6fe2-441c-8c8c-71466251a162
2003-06-27 17:34:32 +00:00