Re: [Qemu-devel] Trouble with GDB & Some 'Can it be done' Debugging questions

2006-07-20 Thread Mulyadi Santosa
Hi Steve...

> Hi -
>
> I'm having a bit of trouble getting gdb to do what I was hoping it
> would with qemu. Following the instructions in the docs:
>
> #1) I launch qemu with -S -s flags ( since I want to trace the
> bootloader code )
> It says: Waiting gdb connection on port 1234 - which is correct, and
> it opens the monitor window.
>
> #2) I open a second terminal window and type gdb vmlinux
>[cut]...
> "i386-redhat-linux-gnu"...vmlinux: No such file or directory.

This message obviously said: either you don't actually have "vmlinux" 
file or you don't give correct path to the vmlinux file.  Can you 
confirm that you had given correct path? Also, it is possible that its 
name isn't vmlinux (since one is free to rename it)...

> #3) Anytime I try to dump the instruction at the current IP such as:
> (gdb) x /10i $eip
>
> I get this - which means it's not actually reading or displaying the
> memory properly, since those look to be what you would see if it was
> all 0 in memory (or maybe it's all 0xff - whichever).l

are you sure you had executed this command in gdb?:
target remote localhost:1234

Seems like gdb is dumping a wrong address space...

> This leads to my next question:
>
> #4) Can you use gdb to debug and set breakpoints on binary code you
> don't have any source code or other file for the binary, except the
> binary file itself? Everything I've read so far on GDB (and
> especially any GDB Gui front end) seems to suggest it's not possible.
> That would really suck.

Well, you can, but of course you can't set the breakpoint at certain 
source code's line, but instead put the breakpoint explicitly as memory 
address.

Anyway, i really suggest to read more about gdb by typing:
info gdb
in your shell prompt. It will display the complete gdb manual.

Don't be hesitate to ask (we're all still learning after all)...

regards,

Mulyadi



___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


[Qemu-devel] compile error ( translate-op.c:36 -op.h:In function `dyng..)

2006-07-20 Thread Sim

Hi!

Have you more info about this problem?

http://qemu.dad-answers.com/viewtopic.php?t=1159

Thanks!


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


[Qemu-devel] kqemu install problem

2006-07-20 Thread Bernd Blaudzun
Hi all,

i try to explain my little problem but first some information about my
system: Fedora Core 5,- i386 Version
qemu-0.8.1, 
Nvidia Graphic, 
Linux FC5-i386 2.6.17-1.2157_FC5 #1 Tue Jul 11 22:55:46 EDT 2006 i686
athlon i386 GNU/Linux


i tried to install kqemu and it worked fine on my last
kernel-2.16.16-1.2133 - but now i updated my kernel to upper version and
now i cant install kqemu anymore - here my messages:

[EMAIL PROTECTED] kqemu-1.3.0pre7]# ./configure
Source path   /usr/src/qemu/kqemu-1.3.0pre7
C compilergcc
Host C compiler   gcc
make  make
host CPU  i386

kernel sources/lib/modules/2.6.17-1.2157_FC5/build
kbuild type   2.6

[EMAIL PROTECTED] kqemu-1.3.0pre7]# make
make -C /lib/modules/2.6.17-1.2157_FC5/build M=`pwd` modules
make[1]: Entering directory
`/usr/src/kernels/2.6.17-1.2157_FC5-i686'
  CC [M]  /usr/src/qemu/kqemu-1.3.0pre7/kqemu-linux.o
/usr/src/qemu/kqemu-1.3.0pre7/kqemu-linux.c:52: Fehler: expected
»)« before string constant
make[2]: *** [/usr/src/qemu/kqemu-1.3.0pre7/kqemu-linux.o]
Fehler 1
make[1]: *** [_module_/usr/src/qemu/kqemu-1.3.0pre7] Fehler 2
make[1]: Leaving directory
`/usr/src/kernels/2.6.17-1.2157_FC5-i686'
make: *** [kqemu.ko] Fehler 2

then i tried another version - kqemu-1.3.0pre9:

[EMAIL PROTECTED] kqemu-1.3.0pre9]# ./configure
Source path   /usr/src/qemu/kqemu-1.3.0pre9
C compilergcc
Host C compiler   gcc
make  make
host CPU  i386

kernel sources/lib/modules/2.6.17-1.2157_FC5/build
kbuild type   2.6
[EMAIL PROTECTED] kqemu-1.3.0pre9]# make
make -C /lib/modules/2.6.17-1.2157_FC5/build M=`pwd` modules
make[1]: Entering directory
`/usr/src/kernels/2.6.17-1.2157_FC5-i686'
  CC [M]  /usr/src/qemu/kqemu-1.3.0pre9/kqemu-linux.o
cp /usr/src/qemu/kqemu-1.3.0pre9/kqemu-mod-i386.o 
/usr/src/qemu/kqemu-1.3.0pre9/kqemu-mod.o
  LD [M]  /usr/src/qemu/kqemu-1.3.0pre9/kqemu.o
  Building modules, stage 2.
  MODPOST
WARNING: could not
find /usr/src/qemu/kqemu-1.3.0pre9/.kqemu-mod.o.cmd
for /usr/src/qemu/kqemu-1.3.0pre9/kqemu-mod.o
  CC  /usr/src/qemu/kqemu-1.3.0pre9/kqemu.mod.o
  LD [M]  /usr/src/qemu/kqemu-1.3.0pre9/kqemu.ko
make[1]: Leaving directory
`/usr/src/kernels/2.6.17-1.2157_FC5-i686'

any ideas where i can find this missed files or any other ideas to fix
this problem ?

Greetz Bernd



___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] compile error ( translate-op.c:36 -op.h:In function `dyng..)

2006-07-20 Thread Jan Marten Simons
Sim wrote:
> Hi!
>
> Have you more info about this problem?
>
> http://qemu.dad-answers.com/viewtopic.php?t=1159
>
Instead of trying to compile 0.80 you might want to try current
cvs-version (link can be found on qemu homepage or the dev-list
archive). It's possible that this problem has been fixed for quite some
time in cvs.

With regards,
Jan



___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] compile error ( translate-op.c:36 -op.h:In function `dyng..)

2006-07-20 Thread Sim

Hi!

Sorry, but I have the some problem with qemu-0.8.1

Thanks


Instead of trying to compile 0.80 you might want to try current
cvs-version (link can be found on qemu homepage or the dev-list
archive). It's possible that this problem has been fixed for quite some
time in cvs.




___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] compile error ( translate-op.c:36 -op.h:In function `dyng..)

2006-07-20 Thread Sim

Here my last test for build QEmu.

Thanks.



./configure --disable-gfx-check --target-list=i386-user --disable-sdl
--disable-audio

g -fno-strict-aliasing -fomit-frame-pointer
-mpreferred-stack-boundary=2 -falign-functions=0 -fno-gcse
-fno-reorder-blocks -fno-optimize-sibling-calls -I. -I..
-I/usr/local/src/qemu-0.8.1/target-i386 -I/usr/local/src/qemu-0.8.1
-I/usr/local/src/qemu-0.8.1/linux-user
-I/usr/local/src/qemu-0.8.1/linux-user/i386 -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-I/usr/local/src/qemu-0.8.1/fpu -DHAS_AUDIO
-I/usr/local/src/qemu-0.8.1/slirp -c -o op.o
/usr/local/src/qemu-0.8.1/target-i386/op.c
../dyngen -o op.h op.o
../dyngen -c -o opc.h op.o
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I..
-I/usr/local/src/qemu-0.8.1/target-i386 -I/usr/local/src/qemu-0.8.1
-I/usr/local/src/qemu-0.8.1/linux-user
-I/usr/local/src/qemu-0.8.1/linux-user/i386 -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-I/usr/local/src/qemu-0.8.1/fpu -DHAS_AUDIO
-I/usr/local/src/qemu-0.8.1/slirp -c -o translate-op.o
/usr/local/src/qemu-0.8.1/translate-op.c
In file included from /usr/local/src/qemu-0.8.1/translate-op.c:36:
op.h: In function `dyngen_code':
op.h:5686: error: parse error before ')' token
op.h:5763: error: parse error before ')' token
op.h:5794: error: parse error before ')' token
op.h:5813: error: parse error before ')' token
op.h:5844: error: parse error before ')' token
op.h:5863: error: parse error before ')' token
op.h:6495: error: parse error before ')' token
op.h:6517: error: parse error before ')' token
op.h:6538: error: parse error before ')' token
op.h:6559: error: parse error before ')' token
op.h:6583: error: parse error before ')' token
op.h:7360: error: parse error before ')' token
op.h:7378: error: parse error before ')' token
op.h:7395: error: parse error before ')' token
op.h:7413: error: parse error before ')' token
op.h:7962: error: parse error before ')' token
op.h:7981: error: parse error before ')' token
op.h:8000: error: parse error before ')' token
op.h:8019: error: parse error before ')' token
op.h:8038: error: parse error before ')' token
op.h:8057: error: parse error before ')' token
op.h:8077: error: parse error before ')' token
op.h:8096: error: parse error before ')' token
op.h:8115: error: parse error before ')' token
op.h:8134: error: parse error before ')' token
op.h:8154: error: parse error before ')' token
make[1]: *** [translate-op.o] Error 1
make[1]: Leaving directory `/usr/local/src/qemu-0.8.1/i386-user'
make: *** [all] Error 1



2006/7/20, Sim <[EMAIL PROTECTED]>:

Hi!

 Sorry, but I have the some problem with qemu-0.8.1

Thanks

> Instead of trying to compile 0.80 you might want to try current
> cvs-version (link can be found on qemu homepage or the dev-list
> archive). It's possible that this problem has been fixed for quite some
> time in cvs.
>




___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


[Qemu-devel] Running QEMU on Windows.

2006-07-20 Thread Joe Lee

Hi All,

I was wondering why the main QEMU site does not have link to download 
windows version for QEMU directly from the QEMU.org site. This link only 
exist here: http://www.h7.dion.ne.jp/~qemu-win/


Isn't the windows version developed by the same developers? Also, about 
the MAC-OS version, where can

one download this?
-joe


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] Trouble with GDB & Some 'Can it be done' Debugging questions

2006-07-20 Thread Daniel Jacobowitz
On Wed, Jul 19, 2006 at 08:43:57AM +, Steve Ellenoff wrote:
> #3) Anytime I try to dump the instruction at the current IP such as:
> (gdb) x /10i $eip
> 
> I get this - which means it's not actually reading or displaying the memory 
> properly, since those look to be what you would see if it was all 0 in 
> memory (or maybe it's all 0xff - whichever).l
> 
> 0xe05f: add%al,(%eax)

qemu doesn't report memory errors to GDB.  It reports -1 values
instead.  This is annoying.  I think I posted a patch for it once and
never followed up when it was ignored.

It might be reading the wrong address; it might be confused due to
segmenting; it might be looking at something that would require a TLB
fault.

> #4) Can you use gdb to debug and set breakpoints on binary code you don't 
> have any source code or other file for the binary, except the binary file 
> itself? Everything I've read so far on GDB (and especially any GDB Gui 
> front end) seems to suggest it's not possible. That would really suck.

Sure you can.  It will just work.

-- 
Daniel Jacobowitz
CodeSourcery


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] compile error ( translate-op.c:36 -op.h:In function `dyng..)

2006-07-20 Thread Sim

Here my last test for build QEmu :-(


./configure --disable-gfx-check --target-list=i386-user --disable-sdl
--disable-audio

g -fno-strict-aliasing -fomit-frame-pointer
-mpreferred-stack-boundary=2 -falign-functions=0 -fno-gcse
-fno-reorder-blocks -fno-optimize-sibling-calls -I. -I..
-I/usr/local/src/qemu-0.8.1/target-i386 -I/usr/local/src/qemu-0.8.1
-I/usr/local/src/qemu-0.8.1/linux-user
-I/usr/local/src/qemu-0.8.1/linux-user/i386 -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-I/usr/local/src/qemu-0.8.1/fpu -DHAS_AUDIO
-I/usr/local/src/qemu-0.8.1/slirp -c -o op.o
/usr/local/src/qemu-0.8.1/target-i386/op.c
../dyngen -o op.h op.o
../dyngen -c -o opc.h op.o
gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -I. -I..
-I/usr/local/src/qemu-0.8.1/target-i386 -I/usr/local/src/qemu-0.8.1
-I/usr/local/src/qemu-0.8.1/linux-user
-I/usr/local/src/qemu-0.8.1/linux-user/i386 -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-I/usr/local/src/qemu-0.8.1/fpu -DHAS_AUDIO
-I/usr/local/src/qemu-0.8.1/slirp -c -o translate-op.o
/usr/local/src/qemu-0.8.1/translate-op.c
In file included from /usr/local/src/qemu-0.8.1/translate-op.c:36:
op.h: In function `dyngen_code':
op.h:5686: error: parse error before ')' token
op.h:5763: error: parse error before ')' token
op.h:5794: error: parse error before ')' token
op.h:5813: error: parse error before ')' token
op.h:5844: error: parse error before ')' token
op.h:5863: error: parse error before ')' token
op.h:6495: error: parse error before ')' token
op.h:6517: error: parse error before ')' token
op.h:6538: error: parse error before ')' token
op.h:6559: error: parse error before ')' token
op.h:6583: error: parse error before ')' token
op.h:7360: error: parse error before ')' token
op.h:7378: error: parse error before ')' token
op.h:7395: error: parse error before ')' token
op.h:7413: error: parse error before ')' token
op.h:7962: error: parse error before ')' token
op.h:7981: error: parse error before ')' token
op.h:8000: error: parse error before ')' token
op.h:8019: error: parse error before ')' token
op.h:8038: error: parse error before ')' token
op.h:8057: error: parse error before ')' token
op.h:8077: error: parse error before ')' token
op.h:8096: error: parse error before ')' token
op.h:8115: error: parse error before ')' token
op.h:8134: error: parse error before ')' token
op.h:8154: error: parse error before ')' token
make[1]: *** [translate-op.o] Error 1
make[1]: Leaving directory `/usr/local/src/qemu-0.8.1/i386-user'
make: *** [all] Error 1


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] Trouble with GDB & Some 'Can it be done' Debugging questions

2006-07-20 Thread Fabrice Bellard

Daniel Jacobowitz wrote:

On Wed, Jul 19, 2006 at 08:43:57AM +, Steve Ellenoff wrote:


#3) Anytime I try to dump the instruction at the current IP such as:
(gdb) x /10i $eip

I get this - which means it's not actually reading or displaying the memory 
properly, since those look to be what you would see if it was all 0 in 
memory (or maybe it's all 0xff - whichever).l


0xe05f: add%al,(%eax)



qemu doesn't report memory errors to GDB.  It reports -1 values
instead.  This is annoying.  I think I posted a patch for it once and
never followed up when it was ignored.


This is not correct: an error is correctly reported by the QEMU gdb stub...

Regards,

Fabrice.


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] Trouble with GDB & Some 'Can it be done' Debugging questions

2006-07-20 Thread Daniel Jacobowitz
On Thu, Jul 20, 2006 at 11:04:01PM +0200, Fabrice Bellard wrote:
> Daniel Jacobowitz wrote:
> >On Wed, Jul 19, 2006 at 08:43:57AM +, Steve Ellenoff wrote:
> >
> >>#3) Anytime I try to dump the instruction at the current IP such as:
> >>(gdb) x /10i $eip
> >>
> >>I get this - which means it's not actually reading or displaying the 
> >>memory properly, since those look to be what you would see if it was all 
> >>0 in memory (or maybe it's all 0xff - whichever).l
> >>
> >>0xe05f: add%al,(%eax)
> >
> >
> >qemu doesn't report memory errors to GDB.  It reports -1 values
> >instead.  This is annoying.  I think I posted a patch for it once and
> >never followed up when it was ignored.
> 
> This is not correct: an error is correctly reported by the QEMU gdb stub...

Must've been fixed then!  Sorry.  In that case, Steve, you're probably
reading the wrong address (maybe segmentation-related?).

-- 
Daniel Jacobowitz
CodeSourcery


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel