qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] About QEMU debugging console


From: Blue Swirl
Subject: Re: [Qemu-devel] About QEMU debugging console
Date: Wed, 27 Oct 2010 20:07:16 +0000

On Wed, Oct 27, 2010 at 1:10 AM, Zhiyuan Shao <address@hidden> wrote:
> On Tue, 2010-10-26 at 18:59 +0000, Blue Swirl wrote:
>> On Tue, Oct 26, 2010 at 12:22 PM, Zhiyuan Shao <address@hidden> wrote:
>> > Hi team,
>> >
>> > I am a Qemu User, and using Qemu 0.13.0 to debugging the linux kernel
>> > code (Qemu+GDB).
>> >
>> > During the usage, I found the Qemu debugging console (i.e., entered by
>> > pressing Ctl+Alt+2 in Qemu SDL window or by passing "-monitor stdio" to
>> > Qemu in the command line) is rather difficult to use. It can not show
>> > some important information, e.g., on i386 platform, which is my major
>> > interest, it can not show IDT, GDT information. Regarding the page
>> > mapping information, "info tlb" actually do a really bad job.
>>
>> How is that bad?
>>
> I booted a Linux OS (i386 with PAE support), and has following
> virtual-to-physical mappings:
> [0xff00-0000,0xffbf-ffff] -> [0x0000-0000, 0x00bf-ffff]
> [0x0000-0000,0x00ff-ffff] -> [0x0000-0000, 0x00ff-ffff]
>
> while now, with "info mem" command of Qemu debugging console, the output
> is like:
> (qemu) info mem
> 00000000-00400000 00400000 -r-
> 00c00000-00c08000 00008000 -rw
> 00c08000-00c09000 00001000 ur-
> 00c09000-00c0a000 00001000 urw
> 00c0e000-00c0f000 00001000 urw
> 00c10000-00c11000 00001000 -r-
> 00c11000-00c12000 00001000 ur-
> 00c12000-00c13000 00001000 -r-
> 00c14000-00c16000 00002000 -r-
> 00c1b000-00c1e000 00003000 -rw
> 00c20000-00c40000 00020000 -rw
> 00c40000-00c41000 00001000 -r-
> 00c41000-00c42000 00001000 ur-
> 00c42000-00c43000 00001000 -rw
> 00c44000-00c60000 0001c000 -rw
> 00c67000-00c70000 00009000 -rw
> 00c71000-00c74000 00003000 ur-
> 00c75000-00c76000 00001000 urw
> 00c77000-00c78000 00001000 ur-
> 00c78000-00c79000 00001000 -rw
> 00c7a000-00d00000 00086000 -rw
> 00d18000-00d19000 00001000 urw
> 00d19000-00d1a000 00001000 -rw
> 00d1d000-00d1e000 00001000 -r-
> 00d22000-00d23000 00001000 -r-
> 00d2a000-00d2b000 00001000 -rw
> 00df0000-00df1000 00001000 -r-
> 00df1000-00df2000 00001000 urw
> 00df4000-00df5000 00001000 -r-
> 00df5000-00df6000 00001000 urw
> 00df7000-00df8000 00001000 urw
> 01000000-01400000 00400000 -rw
> 01400000-01800000 00400000 -r-
> 01800000-01c00000 00400000 urw
> 01c00000-02000000 00400000 -rw
> 04c00000-05000000 00400000 ur-
> 05c00000-06000000 00400000 -rw
> 0bc00000-0c000000 00400000 -r-
> 0c800000-0cc00000 00400000 urw
> 0d800000-0e000000 00800000 ur-
> 0e400000-0e800000 00400000 ur-
> 10400000-10800000 00400000 -rw
> 12000000-12001000 00001000 -rw
> 12002000-12003000 00001000 -rw
> 12004000-12005000 00001000 -rw
> 12006000-12007000 00001000 -rw
> 12008000-12009000 00001000 -rw
> 1200a000-1200b000 00001000 -rw
> 1200c000-1200d000 00001000 -rw
> 1200e000-1200f000 00001000 -rw
> 13bf0000-13bf1000 00001000 -rw
> 13bf2000-13bf3000 00001000 -rw
> 13bf4000-13bf5000 00001000 -rw
> 13bf6000-13bf7000 00001000 -rw
> 13bf8000-13bf9000 00001000 -rw
> 13bfa000-13bfb000 00001000 -rw
>
> Donot know what the "active virtual memory mappings" means for "info
> mem" command, but the results displayed is not very likely being
> correct.
>
> While with "info tlb" command:
>
> (qemu) info tlb
> 00000000: 15c00000 -PDA-T--
> 00c00000: f000f000 G-D-C--W
> 00c01000: f000f000 G-D-C--W
> 00c02000: f000e000 --D----W
> 00c03000: f000f000 G-D-C--W
> 00c04000: f000f000 G-D-C--W
> 00c05000: f000f000 G-D-C--W
> 00c06000: f000f000 G-D-C--W
> 00c07000: f000f000 G-D-C--W
> 00c08000: f000f000 ---A--U-
> 00c09000: f000e000 G-----UW
> 00c0e000: f000e000 G-D-C-UW
> 00c10000: c0008000 G--ACT--
> 00c11000: f000f000 --D--TU-
> 00c12000: f000f000 --D-----
> 00c14000: f000e000 G--ACT--
> 00c15000: f000f000 --D-CT--
> 00c1b000: f000f000 G-D-C--W
> 00c1c000: f000f000 G-D-C--W
> 00c1d000: f000f000 G-D-C--W
> 00c20000: f000f000 G-D-C--W
> 00c21000: f000f000 G-D-C--W
> 00c22000: f000f000 G-D-C--W
> 00c23000: f000f000 G-D-C--W
> 00c24000: f000f000 G-D-C--W
> 00c25000: f000f000 G-D-C--W
> 00c26000: f000f000 G-D-C--W
> 00c27000: f000f000 G-D-C--W
> 00c28000: f000f000 G-D-C--W
> 00c29000: f000f000 G-D-C--W
> 00c2a000: f000f000 G-D-C--W
> 00c2b000: f000f000 G-D-C--W
> 00c2c000: f000f000 G-D-C--W
> 00c2d000: f000f000 G-D-C--W
> 00c2e000: f000f000 G-D-C--W
> 00c2f000: f000f000 G-D-C--W
> 00c30000: f000f000 G-D-C--W
> 00c31000: f000f000 G-D-C--W
> 00c32000: f000f000 G-D-C--W
> 00c33000: f000f000 G-D-C--W
> 00c34000: f000f000 G-D-C--W
> 00c35000: f000f000 G-D-C--W
> 00c36000: f000f000 G-D-C--W
> 00c37000: f000f000 G-D-C--W
> 00c38000: f000f000 G-D-C--W
> 00c39000: f000f000 G-D-C--W
> 00c3a000: f000f000 G-D-C--W
> 00c3b000: f000f000 G-D-C--W
> 00c3c000: f000f000 G-D-C--W
> 00c3d000: f000f000 G-D-C--W
> 00c3e000: f000f000 G-D-C--W
> 00c3f000: f000f000 G-D-C--W
> 00c40000: f000e000 --D-CT--
> 00c41000: 9fc00000 ---ACTU-
> 00c42000: f000f000 G-D-C--W
> 00c44000: f000f000 G-D-C--W
> 00c45000: f000f000 G-D-C--W
> 00c46000: f000f000 G-D-C--W
> 00c47000: f000f000 G-D-C--W
> 00c48000: f000f000 G-D-C--W
> 00c49000: f000f000 G-D-C--W
> 00c4a000: f000f000 G-D-C--W
> 00c4b000: f000f000 G-D-C--W
> 00c4c000: f000f000 G-D-C--W
> 00c4d000: f000f000 G-D-C--W
> 00c4e000: f000f000 G-D-C--W
> 00c4f000: f000f000 G-D-C--W
> 00c50000: f000f000 G-D-C--W
> 00c51000: f000f000 G-D-C--W
> 00c52000: f000f000 G-D-C--W
> 00c53000: f000f000 G-D-C--W
> 00c54000: f000f000 G-D-C--W
> 00c55000: f000f000 G-D-C--W
> 00c56000: f000f000 G-D-C--W
> 00c57000: f000f000 G-D-C--W
> 00c58000: f000f000 G-D-C--W
> 00c59000: f000f000 G-D-C--W
> 00c5a000: f000f000 G-D-C--W
> 00c5b000: f000f000 G-D-C--W
> 00c5c000: f000f000 G-D-C--W
> 00c5d000: f000f000 G-D-C--W
> 00c5e000: f000f000 G-D-C--W
> 00c5f000: f000f000 G-D-C--W
> 00c67000: f000f000 G-D-C--W
> 00c68000: f000f000 G-D-C--W
> 00c69000: f000f000 G-D-C--W
> 00c6a000: f000f000 G-D-C--W
> 00c6b000: f000f000 G-D-C--W
> 00c6c000: f000f000 G-D-C--W
> 00c6d000: f000f000 G-D-C--W
> 00c6e000: f000f000 G-D-C--W
> 00c6f000: f000f000 G-D-C--W
> 00c71000: f000f000 G-D---U-
> 00c72000: f000f000 G-D---U-
> 00c73000: f000f000 G-D---U-
> 00c75000: f000e000 --DA--UW
> 00c77000: f000f000 G-D---U-
> 00c78000: f000f000 G-D-C--W
> 00c7a000: f000f000 G-D-C--W
> 00c7b000: f000f000 G-D-C--W
> 00c7c000: f000f000 G-D-C--W
> 00c7d000: f000f000 G-D-C--W
> 00c7e000: f000f000 G-D-C--W
> 00c7f000: f000f000 G-D-C--W
> 00c80000: f000f000 G-D-C--W
> 00c81000: f000f000 G-D-C--W
> 00c82000: f000f000 G-D-C--W
> 00c83000: f000f000 G-D-C--W
> 00c84000: f000f000 G-D-C--W
> 00c85000: f000f000 G-D-C--W
> 00c86000: f000f000 G-D-C--W
> 00c87000: f000f000 G-D-C--W
> 00c88000: f000f000 G-D-C--W
> 00c89000: f000f000 G-D-C--W
> 00c8a000: f000f000 G-D-C--W
> 00c8b000: f000f000 G-D-C--W
> 00c8c000: f000f000 G-D-C--W
> 00c8d000: f000f000 G-D-C--W
> 00c8e000: f000f000 G-D-C--W
> 00c8f000: f000f000 G-D-C--W
> 00c90000: f000f000 G-D-C--W
> 00c91000: f000f000 G-D-C--W
> 00c92000: f000f000 G-D-C--W
> 00c93000: f000f000 G-D-C--W
> 00c94000: f000f000 G-D-C--W
> 00c95000: f000f000 G-D-C--W
> 00c96000: f000f000 G-D-C--W
> 00c97000: f000f000 G-D-C--W
> 00c98000: f000f000 G-D-C--W
> 00c99000: f000f000 G-D-C--W
> 00c9a000: f000f000 G-D-C--W
> 00c9b000: f000f000 G-D-C--W
> 00c9c000: f000f000 G-D-C--W
> 00c9d000: f000f000 G-D-C--W
> 00c9e000: f000f000 G-D-C--W
> 00c9f000: f000f000 G-D-C--W
> 00ca0000: f000f000 G-D-C--W
> 00ca1000: f000f000 G-D-C--W
> 00ca2000: f000f000 G-D-C--W
> 00ca3000: f000f000 G-D-C--W
> 00ca4000: f000f000 G-D-C--W
> 00ca5000: f000f000 G-D-C--W
> 00ca6000: f000f000 G-D-C--W
> 00ca7000: f000f000 G-D-C--W
> 00ca8000: f000f000 G-D-C--W
> 00ca9000: f000f000 G-D-C--W
> 00caa000: f000f000 G-D-C--W
> 00cab000: f000f000 G-D-C--W
> 00cac000: f000f000 G-D-C--W
> 00cad000: f000f000 G-D-C--W
> 00cae000: f000f000 G-D-C--W
> 00caf000: f000f000 G-D-C--W
> 00cb0000: f000f000 G-D-C--W
> 00cb1000: f000f000 G-D-C--W
> 00cb2000: f000f000 G-D-C--W
> 00cb3000: f000f000 G-D-C--W
> 00cb4000: f000f000 G-D-C--W
> 00cb5000: f000f000 G-D-C--W
> 00cb6000: f000f000 G-D-C--W
> 00cb7000: f000f000 G-D-C--W
> 00cb8000: f000f000 G-D-C--W
> 00cb9000: f000f000 G-D-C--W
> 00cba000: f000f000 G-D-C--W
> 00cbb000: f000f000 G-D-C--W
> 00cbc000: f000f000 G-D-C--W
> 00cbd000: f000f000 G-D-C--W
> 00cbe000: f000f000 G-D-C--W
> 00cbf000: f000f000 G-D-C--W
> 00cc0000: f000f000 G-D-C--W
> 00cc1000: f000f000 G-D-C--W
> 00cc2000: f000f000 G-D-C--W
> 00cc3000: f000f000 G-D-C--W
> 00cc4000: f000f000 G-D-C--W
> 00cc5000: f000f000 G-D-C--W
> 00cc6000: f000f000 G-D-C--W
> 00cc7000: f000f000 G-D-C--W
> 00cc8000: f000f000 G-D-C--W
> 00cc9000: f000f000 G-D-C--W
> 00cca000: f000f000 G-D-C--W
> 00ccb000: f000f000 G-D-C--W
> 00ccc000: f000f000 G-D-C--W
> 00ccd000: f000f000 G-D-C--W
> 00cce000: f000f000 G-D-C--W
> 00ccf000: f000f000 G-D-C--W
> 00cd0000: f000f000 G-D-C--W
> 00cd1000: f000f000 G-D-C--W
> 00cd2000: f000f000 G-D-C--W
> 00cd3000: f000f000 G-D-C--W
> 00cd4000: f000f000 G-D-C--W
> 00cd5000: f000f000 G-D-C--W
> 00cd6000: f000f000 G-D-C--W
> 00cd7000: f000f000 G-D-C--W
> 00cd8000: f000f000 G-D-C--W
> 00cd9000: f000f000 G-D-C--W
> 00cda000: f000f000 G-D-C--W
> 00cdb000: f000f000 G-D-C--W
> 00cdc000: f000f000 G-D-C--W
> 00cdd000: f000f000 G-D-C--W
> 00cde000: f000f000 G-D-C--W
> 00cdf000: f000f000 G-D-C--W
> 00ce0000: f000f000 G-D-C--W
> 00ce1000: f000f000 G-D-C--W
> 00ce2000: f000f000 G-D-C--W
> 00ce3000: f000f000 G-D-C--W
> 00ce4000: f000f000 G-D-C--W
> 00ce5000: f000f000 G-D-C--W
> 00ce6000: f000f000 G-D-C--W
> 00ce7000: f000f000 G-D-C--W
> 00ce8000: f000f000 G-D-C--W
> 00ce9000: f000f000 G-D-C--W
> 00cea000: f000f000 G-D-C--W
> 00ceb000: f000f000 G-D-C--W
> 00cec000: f000f000 G-D-C--W
> 00ced000: f000f000 G-D-C--W
> 00cee000: f000f000 G-D-C--W
> 00cef000: f000f000 G-D-C--W
> 00cf0000: f000f000 G-D-C--W
> 00cf1000: f000f000 G-D-C--W
> 00cf2000: f000f000 G-D-C--W
> 00cf3000: f000f000 G-D-C--W
> 00cf4000: f000f000 G-D-C--W
> 00cf5000: f000f000 G-D-C--W
> 00cf6000: f000f000 G-D-C--W
> 00cf7000: f000f000 G-D-C--W
> 00cf8000: f000f000 G-D-C--W
> 00cf9000: f000f000 G-D-C--W
> 00cfa000: f000f000 G-D-C--W
> 00cfb000: f000f000 G-D-C--W
> 00cfc000: f000f000 G-D-C--W
> 00cfd000: f000f000 G-D-C--W
> 00cfe000: f000f000 G-D-C--W
> 00cff000: f000f000 G-D-C--W
> 00d18000: d4000000 ------UW
> 00d19000: 00000000 -------W
> 00d1d000: 00c00000 G-------
> 00d22000: 00085000 G-DACT--
> 00d2a000: c0003000 G--A---W
> 00df0000: fe830000 --------
> 00df1000: 003f7000 G-DACTUW
> 00df4000: fe827000 --D-----
> 00df5000: a87cb000 --DACTUW
> 00df7000: 00000000 -----TUW
> 01000000: e4500000 GPDACT-W
> 01400000: 24500000 -P-A----
> 01800000: e0200000 GPDACTUW
> 01c00000: 00e00000 GP---T-W
> 04c00000: b8a00000 GP---TU-
> 05c00000: e2000000 GP-----W
> 0bc00000: 75f00000 GP---T--
> 0c800000: 13e00000 -PDACTUW
> 0d800000: 90f00000 GPDA--U-
> 0dc00000: 00200000 -P---TU-
> 0e400000: 00000000 -P---TU-
> 10400000: 90900000 -PDA-T-W
> 12000000: 002a8000 --DA---W
> 12002000: 00200000 --DA---W
> 12004000: 00400000 --DA---W
> 12006000: 00600000 --DA---W
> 12008000: 00800000 --DA---W
> 1200a000: 00a00000 --DA---W
> 1200c000: 00c00000 --DA---W
> 1200e000: 00e00000 --DA---W
> 13bf0000: 002a8000 --DA---W
> 13bf2000: 00200000 --DA---W
> 13bf4000: 00400000 --DA---W
> 13bf6000: 00600000 --DA---W
> 13bf8000: 00800000 --DA---W
> 13bfa000: 00a00000 --DA---W
> (qemu)
>
> Is here someone can explain such output?

The output is generated in monitor.c:1812:1926. The functions use only
uint32_t, so I suppose PAE support has not been added.

>> > On this side, I think Bochs is good. Unfortunately, it seems do not
>> > support gdb-stub debugging and general purpose debugging at the same
>> > time.
>> >
>> > I do not know if the Qemu team had made any plans to improve this? such
>> > as embedding the bochs debugging alike functionalities in future Qemu
>> > releases?
>>
>> Perhaps nobody were aware that there were any lack of functionalities.
>> I think these should be very easy to add.
>>
>
> This should be not so hard, and I may have a try in the close future.
> The difficulty here is that you have to consider several paging
> techniques invented by Intel, such as, i386, PAE, PSE(36), x86_64. And
> these works ONLY for the i386 platform.
>
> I just wondering: It is for sure that I am not the very first person who
> encounter such problems in the history of Qemu development. Why these
> simple functionalities were not added to the main release till now?

I think that you really are the first one to report, so nobody has
ever needed such functionalities yet. In fact, I searched mail
archives and there was nothing relevant for PAE.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]