Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: Pedro Alves <pedro@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [patch] Add tests for JIT debugging interface
Date: Wed, 12 Jan 2011 17:23:00 -0000	[thread overview]
Message-ID: <4D2DDD61.6040101@codesourcery.com> (raw)
In-Reply-To: <AANLkTimGiACMJOhbnVfpjOm3DRF1NHDEh4zt7ia4pMoV@mail.gmail.com>

On 01/12/2011 09:08 AM, Paul Pluzhnikov wrote:
> On Wed, Jan 12, 2011 at 2:03 AM, Pedro Alves<pedro@codesourcery.com>  wrote:
>> On Wednesday 12 January 2011 05:39:32, Yao Qi wrote:
>>> Test cases work well in native GDB.  Does gdbserver have JIT debugging
>>> interface also?  If not, we probably should skip this test for remote
>>> mode or kfail it.
>>
>> The JIT debugging interface is all implemented in common code,
>> so it should work against remote/gdbserver as well (though I haven't
>> tried it).  A gdb_load_shlibs call to copy the shlib to the
>> target appears to be missing though.
>
> I tried running the test with gdbserver-native, and it failed, because
> 'set args' doesn't work in server mode (AFAICT).
>

Yes, I also got some failures due to this.  Then I hacked jit-main.c to 
set libname by an absolute path on my laptop, so no args are needed any 
more.  There are still two failures, which are not about 'set args' in 
gdbserver.

FAIL: gdb.base/jit.exp: info function jit_function
FAIL: gdb.base/jit.exp: info function jit_function

info function jit_function^M
All functions matching regular expression "jit_function":^M
(gdb) FAIL: gdb.base/jit.exp: info function jit_function

In gdb.log, I find something strange,

(gdb) continue^M
Continuing.^M
jit_inferior_init, registering_code = 0^M
jit_inferior_init, reg_addr = 0x80486c4^M
jit_inferior_init, jit_descriptor_addr = 0x804a040^M
Cannot remove breakpoints because program is no longer writable. <-- [1]

There is no such error [1] in native gdb test.  I have no clue on this 
so far.

> I grepped through *.exp in search of examples of how to run programs
> that require args under gdbserver, but didn't find any.
>
> I want something like
>
>    if {[is_remote host]} {
>      spawn gdbserver :2345 exe shlib 1
>    } else {
>      spawn gdb --args exe shlib 1
>    }
>
> Is there a "standard" way to achieve this?
>
>> You want notice it missing
>> if you do the usual gdbserver running on the same machine as
>> gdb testing (*).
>
> Right. I didn't get that far yet.
>
> Are there instructions for running with gdbserver on different host?

We may re-write jit-main.c a little bit to compute the location of 
jit-solib.so via getcwd() + argv[0], rather than passing arguments of 
its location.

-- 
Yao Qi


  parent reply	other threads:[~2011-01-12 16:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11 23:28 Paul Pluzhnikov
2011-01-12  7:02 ` Yao Qi
2011-01-12 10:44   ` Pedro Alves
2011-01-12 15:19     ` Paul Pluzhnikov
2011-01-12 16:12       ` Pedro Alves
2011-01-12 17:23       ` Yao Qi [this message]
2011-01-12 17:33         ` Paul Pluzhnikov
2011-01-18 17:07           ` Paul Pluzhnikov
2011-01-19 19:27           ` Pedro Alves
2011-01-19 20:30             ` Paul Pluzhnikov
2011-01-19 21:04               ` Pedro Alves
2011-01-19 21:09               ` Yao Qi
2011-01-12 10:03 ` Pedro Alves

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=4D2DDD61.6040101@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    --cc=ppluzhnikov@google.com \
    /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