All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Editing qemu source code
@ 2017-08-06 11:25 Shantanu Agarwal
  2017-08-06 11:44 ` Stefan Weil
  0 siblings, 1 reply; 3+ messages in thread
From: Shantanu Agarwal @ 2017-08-06 11:25 UTC (permalink / raw)
  To: qemu-devel

Hello all,
I was reading about qemu, trying to understand the source code. I found
that vl.c is considered the main file of qemu source code from where all
the execution starts. So I flipped some values, i even put a exit(0) just
after the int main starts, but nothing is changed. Qemu is fully
functional. Also i put many printf's in between but no output at all. Am I
missing something or vl.c is not the main file.

-- 
with regards,
Shantanu Agarwal
Mtech 2nd Year
+919958818058
IIT Delhi, New Delhi - 110016

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Editing qemu source code
  2017-08-06 11:25 [Qemu-devel] Editing qemu source code Shantanu Agarwal
@ 2017-08-06 11:44 ` Stefan Weil
  2017-08-07  8:35   ` Stefan Hajnoczi
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Weil @ 2017-08-06 11:44 UTC (permalink / raw)
  To: Shantanu Agarwal, qemu-devel

Am 06.08.2017 um 13:25 schrieb Shantanu Agarwal:
> Hello all,
> I was reading about qemu, trying to understand the source code. I found
> that vl.c is considered the main file of qemu source code from where all
> the execution starts. So I flipped some values, i even put a exit(0) just
> after the int main starts, but nothing is changed. Qemu is fully
> functional. Also i put many printf's in between but no output at all. Am I
> missing something or vl.c is not the main file.
> 

Hi,

the main function in vl.c is the correct entry point.
If you don't see an effect of your changes, then you
are probably calling an executable which is not the
changed one.

What about using gdb to see what happens?

Regards
Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Editing qemu source code
  2017-08-06 11:44 ` Stefan Weil
@ 2017-08-07  8:35   ` Stefan Hajnoczi
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2017-08-07  8:35 UTC (permalink / raw)
  To: Shantanu Agarwal; +Cc: Stefan Weil, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]

On Sun, Aug 06, 2017 at 01:44:52PM +0200, Stefan Weil wrote:
> Am 06.08.2017 um 13:25 schrieb Shantanu Agarwal:
> > Hello all,
> > I was reading about qemu, trying to understand the source code. I found
> > that vl.c is considered the main file of qemu source code from where all
> > the execution starts. So I flipped some values, i even put a exit(0) just
> > after the int main starts, but nothing is changed. Qemu is fully
> > functional. Also i put many printf's in between but no output at all. Am I
> > missing something or vl.c is not the main file.
> > 
> 
> Hi,
> 
> the main function in vl.c is the correct entry point.
> If you don't see an effect of your changes, then you
> are probably calling an executable which is not the
> changed one.

Yes, this is a common cause for this problem.  Are you launching the
correct QEMU binary?

For example, the x86 full-system emulator built in the source tree can
be run like this:

  $ cd qemu
  $ x86_64-softmmu/qemu-system-x86_64

Remember that operating systems resolve shell commands using the PATH
environment variable.  If you ran 'qemu-system-x86_64' without a
relative or absolute path then you are probably running the QEMU binary
that was installed from a package somewhere else on your system (e.g.
/usr/bin/qemu-system-x86_64).

If you ran 'make install' then make sure to give the full path to the
QEMU binary (e.g. /usr/local/bin/qemu-system-x86_64) or set PATH so
/usr/local/bin comes before other directories in the search path.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-07  8:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-06 11:25 [Qemu-devel] Editing qemu source code Shantanu Agarwal
2017-08-06 11:44 ` Stefan Weil
2017-08-07  8:35   ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.