* [Qemu-devel] Debug single program in QEMU @ 2012-03-15 2:12 Yue Chen 2012-03-15 6:26 ` Mulyadi Santosa 0 siblings, 1 reply; 10+ messages in thread From: Yue Chen @ 2012-03-15 2:12 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 170 bytes --] Hi!~ Now I'd like to see what the micro-ops (intermediate operations generated by TCG) of a single Linux or Windows program, any approach to do this under QEMU? Thanks. [-- Attachment #2: Type: text/html, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Debug single program in QEMU 2012-03-15 2:12 [Qemu-devel] Debug single program in QEMU Yue Chen @ 2012-03-15 6:26 ` Mulyadi Santosa 2012-03-15 8:14 ` 陳韋任 0 siblings, 1 reply; 10+ messages in thread From: Mulyadi Santosa @ 2012-03-15 6:26 UTC (permalink / raw) To: Yue Chen; +Cc: qemu-devel On Thu, Mar 15, 2012 at 09:12, Yue Chen <ycyc321@gmail.com> wrote: > Hi!~ > > Now I'd like to see what the micro-ops (intermediate operations generated by > TCG) of a single Linux or Windows program, any approach to do this under > QEMU? Thanks. are you referring to you Qemu system emulation or Qemu user mode? -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Debug single program in QEMU 2012-03-15 6:26 ` Mulyadi Santosa @ 2012-03-15 8:14 ` 陳韋任 2012-03-15 13:40 ` Yue Chen 0 siblings, 1 reply; 10+ messages in thread From: 陳韋任 @ 2012-03-15 8:14 UTC (permalink / raw) To: Mulyadi Santosa; +Cc: qemu-devel, Yue Chen On Thu, Mar 15, 2012 at 01:26:44PM +0700, Mulyadi Santosa wrote: > On Thu, Mar 15, 2012 at 09:12, Yue Chen <ycyc321@gmail.com> wrote: > > Hi!~ > > > > Now I'd like to see what the micro-ops (intermediate operations generated by > > TCG) of a single Linux or Windows program, any approach to do this under > > QEMU? Thanks. > > are you referring to you Qemu system emulation or Qemu user mode? Does that matter? I think "-d op" should be enough, right? Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Debug single program in QEMU 2012-03-15 8:14 ` 陳韋任 @ 2012-03-15 13:40 ` Yue Chen 2012-03-16 2:24 ` 陳韋任 0 siblings, 1 reply; 10+ messages in thread From: Yue Chen @ 2012-03-15 13:40 UTC (permalink / raw) To: 陳韋任; +Cc: Mulyadi Santosa, qemu-devel [-- Attachment #1: Type: text/plain, Size: 871 bytes --] But it is hard to localize a specific program instead of lots of logs. On Mar 15, 2012 4:14 AM, "陳韋任" <chenwj@iis.sinica.edu.tw> wrote: > On Thu, Mar 15, 2012 at 01:26:44PM +0700, Mulyadi Santosa wrote: > > On Thu, Mar 15, 2012 at 09:12, Yue Chen <ycyc321@gmail.com> wrote: > > > Hi!~ > > > > > > Now I'd like to see what the micro-ops (intermediate operations > generated by > > > TCG) of a single Linux or Windows program, any approach to do this > under > > > QEMU? Thanks. > > > > are you referring to you Qemu system emulation or Qemu user mode? > > Does that matter? I think "-d op" should be enough, right? > > Regards, > chenwj > > -- > Wei-Ren Chen (陳韋任) > Computer Systems Lab, Institute of Information Science, > Academia Sinica, Taiwan (R.O.C.) > Tel:886-2-2788-3799 #1667 > Homepage: http://people.cs.nctu.edu.tw/~chenwj > [-- Attachment #2: Type: text/html, Size: 1318 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Debug single program in QEMU 2012-03-15 13:40 ` Yue Chen @ 2012-03-16 2:24 ` 陳韋任 2012-03-16 2:42 ` Yue Chen 2012-04-06 1:17 ` Yue Chen 0 siblings, 2 replies; 10+ messages in thread From: 陳韋任 @ 2012-03-16 2:24 UTC (permalink / raw) To: Yue Chen; +Cc: Mulyadi Santosa, qemu-devel, 陳韋任 O.K., then. You must specify which mode you're running, user mode or system mode? User mode shouldn't have the issue you described. For system mode, I have no good idea on how to track a specific program running on the guest OS. On Thu, Mar 15, 2012 at 09:40:48AM -0400, Yue Chen wrote: > But it is hard to localize a specific program instead of lots of logs. > On Mar 15, 2012 4:14 AM, "陳韋任" <chenwj@iis.sinica.edu.tw> wrote: > > > On Thu, Mar 15, 2012 at 01:26:44PM +0700, Mulyadi Santosa wrote: > > > On Thu, Mar 15, 2012 at 09:12, Yue Chen <ycyc321@gmail.com> wrote: > > > > Hi!~ > > > > > > > > Now I'd like to see what the micro-ops (intermediate operations > > generated by > > > > TCG) of a single Linux or Windows program, any approach to do this > > under > > > > QEMU? Thanks. > > > > > > are you referring to you Qemu system emulation or Qemu user mode? > > > > Does that matter? I think "-d op" should be enough, right? Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Debug single program in QEMU 2012-03-16 2:24 ` 陳韋任 @ 2012-03-16 2:42 ` Yue Chen 2012-03-16 3:04 ` 陳韋任 2012-04-06 1:17 ` Yue Chen 1 sibling, 1 reply; 10+ messages in thread From: Yue Chen @ 2012-03-16 2:42 UTC (permalink / raw) To: 陳韋任; +Cc: Mulyadi Santosa, qemu-devel [-- Attachment #1: Type: text/plain, Size: 1411 bytes --] So how to run a Windows program or Linux program under user mode ? I cannot find useful documentations. Many thanks. 2012/3/15 陳韋任 <chenwj@iis.sinica.edu.tw> > O.K., then. You must specify which mode you're running, user mode or > system > mode? User mode shouldn't have the issue you described. For system mode, I > have > no good idea on how to track a specific program running on the guest OS. > > On Thu, Mar 15, 2012 at 09:40:48AM -0400, Yue Chen wrote: > > But it is hard to localize a specific program instead of lots of logs. > > On Mar 15, 2012 4:14 AM, "陳韋任" <chenwj@iis.sinica.edu.tw> wrote: > > > > > On Thu, Mar 15, 2012 at 01:26:44PM +0700, Mulyadi Santosa wrote: > > > > On Thu, Mar 15, 2012 at 09:12, Yue Chen <ycyc321@gmail.com> wrote: > > > > > Hi!~ > > > > > > > > > > Now I'd like to see what the micro-ops (intermediate operations > > > generated by > > > > > TCG) of a single Linux or Windows program, any approach to do this > > > under > > > > > QEMU? Thanks. > > > > > > > > are you referring to you Qemu system emulation or Qemu user mode? > > > > > > Does that matter? I think "-d op" should be enough, right? > > Regards, > chenwj > > -- > Wei-Ren Chen (陳韋任) > Computer Systems Lab, Institute of Information Science, > Academia Sinica, Taiwan (R.O.C.) > Tel:886-2-2788-3799 #1667 > Homepage: http://people.cs.nctu.edu.tw/~chenwj > [-- Attachment #2: Type: text/html, Size: 2080 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Debug single program in QEMU 2012-03-16 2:42 ` Yue Chen @ 2012-03-16 3:04 ` 陳韋任 2012-04-04 0:58 ` Yue Chen 0 siblings, 1 reply; 10+ messages in thread From: 陳韋任 @ 2012-03-16 3:04 UTC (permalink / raw) To: Yue Chen; +Cc: Mulyadi Santosa, qemu-devel, 陳韋任 http://qemu.weilnetz.de/qemu-doc.html#QEMU-User-space-emulator On Thu, Mar 15, 2012 at 10:42:02PM -0400, Yue Chen wrote: > So how to run a Windows program or Linux program under user mode ? I cannot > find useful documentations. Many thanks. -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Debug single program in QEMU 2012-03-16 3:04 ` 陳韋任 @ 2012-04-04 0:58 ` Yue Chen 2012-04-04 2:56 ` 陳韋任 0 siblings, 1 reply; 10+ messages in thread From: Yue Chen @ 2012-04-04 0:58 UTC (permalink / raw) To: 陳韋任; +Cc: Mulyadi Santosa, qemu-devel [-- Attachment #1: Type: text/plain, Size: 951 bytes --] Hi, Could you tell me what kind of programs can be emulated in user-mode of QEMU ? It seems that only limited programs can be emulated in user-mode, like /bin/ls, and with warning. A lot of other programs cannot be emulated, like GUI programs, browser, etc. Additionally, why so many instructions come out when I use " -d in_asm " to log? It's hard to find the real instructions of that single program... Thanks. 2012/3/15 陳韋任 <chenwj@iis.sinica.edu.tw> > http://qemu.weilnetz.de/qemu-doc.html#QEMU-User-space-emulator > > On Thu, Mar 15, 2012 at 10:42:02PM -0400, Yue Chen wrote: > > So how to run a Windows program or Linux program under user mode ? I > cannot > > find useful documentations. Many thanks. > > -- > Wei-Ren Chen (陳韋任) > Computer Systems Lab, Institute of Information Science, > Academia Sinica, Taiwan (R.O.C.) > Tel:886-2-2788-3799 #1667 > Homepage: http://people.cs.nctu.edu.tw/~chenwj > [-- Attachment #2: Type: text/html, Size: 1570 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Debug single program in QEMU 2012-04-04 0:58 ` Yue Chen @ 2012-04-04 2:56 ` 陳韋任 0 siblings, 0 replies; 10+ messages in thread From: 陳韋任 @ 2012-04-04 2:56 UTC (permalink / raw) To: Yue Chen; +Cc: Mulyadi Santosa, qemu-devel, 陳韋任 > Could you tell me what kind of programs can be emulated in user-mode of > QEMU ? Use-mode can emulate programs compiled for different ISA but with same OS. > It seems that only limited programs can be emulated in user-mode, like > /bin/ls, and with warning. A lot of other programs cannot be emulated, like > GUI programs, browser, etc. Currently, I only emulate command line programs, i.e., something like `/bin/ls`. I am curious about running /bin/ls with warning in your case. Can you elaborate on what your enviroment is? For example, what version of QEMU you're using, how you run the example program, and what kind of warning you have. I don't know QEMU can/cannot deal with GUI, but I think it should. You can also give us an example on that. > Additionally, why so many instructions come out when I use " -d in_asm " > to log? It's hard to find the real instructions of that single program... You have to know that even a simple helloworld contains many instructions than you thought (dynamic linker, for example). My suggestion is using `objdump` at the same time to locate the function you're interested in, then look into the log. Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Debug single program in QEMU 2012-03-16 2:24 ` 陳韋任 2012-03-16 2:42 ` Yue Chen @ 2012-04-06 1:17 ` Yue Chen 1 sibling, 0 replies; 10+ messages in thread From: Yue Chen @ 2012-04-06 1:17 UTC (permalink / raw) To: 陳韋任; +Cc: Mulyadi Santosa, qemu-devel [-- Attachment #1: Type: text/plain, Size: 1474 bytes --] Hi, thanks again for your reply. It seems that, from the instruction log, we can find out "*which instructions belong to which process(task)*" according to CR3 register. 2012/3/15 陳韋任 <chenwj@iis.sinica.edu.tw> > O.K., then. You must specify which mode you're running, user mode or > system > mode? User mode shouldn't have the issue you described. For system mode, I > have > no good idea on how to track a specific program running on the guest OS. > > On Thu, Mar 15, 2012 at 09:40:48AM -0400, Yue Chen wrote: > > But it is hard to localize a specific program instead of lots of logs. > > On Mar 15, 2012 4:14 AM, "陳韋任" <chenwj@iis.sinica.edu.tw> wrote: > > > > > On Thu, Mar 15, 2012 at 01:26:44PM +0700, Mulyadi Santosa wrote: > > > > On Thu, Mar 15, 2012 at 09:12, Yue Chen <ycyc321@gmail.com> wrote: > > > > > Hi!~ > > > > > > > > > > Now I'd like to see what the micro-ops (intermediate operations > > > generated by > > > > > TCG) of a single Linux or Windows program, any approach to do this > > > under > > > > > QEMU? Thanks. > > > > > > > > are you referring to you Qemu system emulation or Qemu user mode? > > > > > > Does that matter? I think "-d op" should be enough, right? > > Regards, > chenwj > > -- > Wei-Ren Chen (陳韋任) > Computer Systems Lab, Institute of Information Science, > Academia Sinica, Taiwan (R.O.C.) > Tel:886-2-2788-3799 #1667 > Homepage: http://people.cs.nctu.edu.tw/~chenwj > [-- Attachment #2: Type: text/html, Size: 2235 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-04-06 1:17 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-03-15 2:12 [Qemu-devel] Debug single program in QEMU Yue Chen 2012-03-15 6:26 ` Mulyadi Santosa 2012-03-15 8:14 ` 陳韋任 2012-03-15 13:40 ` Yue Chen 2012-03-16 2:24 ` 陳韋任 2012-03-16 2:42 ` Yue Chen 2012-03-16 3:04 ` 陳韋任 2012-04-04 0:58 ` Yue Chen 2012-04-04 2:56 ` 陳韋任 2012-04-06 1:17 ` Yue Chen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).