qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gauresh Rane <gdrane@cs.ucla.edu>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Max Filippov <jcmvbkbc@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Problem with translating on ARM and Qemu beginner question
Date: Sat, 26 Nov 2011 11:37:41 -0800 (PST)	[thread overview]
Message-ID: <6cdcd3fd-2ef8-4e9a-a322-d2d12a367946@mail.cs.ucla.edu> (raw)
In-Reply-To: <CAFEAcA8G2j_fjcPOF8KZNJaym+=h57F7Dr1DwTs6+jSL2mSntQ@mail.gmail.com>

The problem was indeed with the stack. It's just doing a fake push, that is the environment variables are updated but the the variables are not loaded into the stack. I see the values in the stack always are zero.

I am trying to figure out what might be the reason for this.

Thanks for the help,

Regards,

Gauresh Rane
Grad Student
CS Department
UCLA

----- Original Message -----
From: "Peter Maydell" <peter.maydell@linaro.org>
To: "Max Filippov" <jcmvbkbc@gmail.com>
Cc: "Gauresh Rane" <gdrane@cs.ucla.edu>, qemu-devel@nongnu.org
Sent: Friday, November 25, 2011 7:40:52 AM
Subject: Re: [Qemu-devel] Problem with translating on ARM and Qemu beginner question

On 25 November 2011 15:35, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> Breakpoint 7, cpu_arm_exec (env=0x102033200) at ~/qemu-0.15.0/cpu-exec.c:557
>> 557                         next_tb = tcg_qemu_tb_exec(env, tc_ptr);
>> (gdb) p/x env->regs
>> $13 = {0x4002c00c, 0x20, 0x4, 0x0, 0x0, 0x0, 0x40000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x30, 0x10007fa8, 0x560d, 0x560c}
>> (gdb) s
>> 558                         if ((next_tb & 3) == 2) {
>> (gdb) p/x env->regs
>> $14 = {0x10048000, 0x20, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x30, 0x10007fb8, 0x560d, 0x0}
>>
>> How to check access to unallocated memory? It's not seg faulting.
>
> 290 0000042c <_init>:
> 291  42c:   b5f8        push    {r3, r4, r5, r6, r7, lr}
>
> set breakpoint here and see with x/6wx $sp whether saved register values are good.

To clarify this a bit: that means "set a breakpoint in an ARM gdb attached
to qemu's gdb-stub interface". That gdb will see the view of the guest
CPU, whereas connecting an x86 gdb directly to qemu you're looking at
qemu's internal data structures, which can be more confusing.

-- PMM

  reply	other threads:[~2011-11-26 19:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <519552ce-93df-4c90-82c6-1938d72bff72@mail.cs.ucla.edu>
2011-11-25 10:27 ` [Qemu-devel] Problem with translating on ARM and Qemu beginner question Gauresh Rane
2011-11-25 11:39   ` Peter Maydell
2011-11-25 12:33     ` Gauresh Rane
2011-11-25 12:47       ` Peter Maydell
2011-11-25 13:04         ` Max Filippov
2011-11-25 14:13           ` Gauresh Rane
2011-11-25 15:35             ` Max Filippov
2011-11-25 15:40               ` Peter Maydell
2011-11-26 19:37                 ` Gauresh Rane [this message]
2011-11-26 23:31                 ` Gauresh Rane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6cdcd3fd-2ef8-4e9a-a322-d2d12a367946@mail.cs.ucla.edu \
    --to=gdrane@cs.ucla.edu \
    --cc=jcmvbkbc@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).