Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Aleksandar Ristovski <aristovski@qnx.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] Relocate phdr in read_program_header
Date: Tue, 18 Oct 2011 13:41:00 -0000	[thread overview]
Message-ID: <20111018133159.GA14219@host1.jankratochvil.net> (raw)
In-Reply-To: <4E9C5734.4000609@qnx.com>

On Mon, 17 Oct 2011 18:26:28 +0200, Aleksandar Ristovski wrote:
> I was contemplating a testcase but I couldn't think of a trick to
> "make" gdb not find the executable... Thanks for the test.

The testcase of mine has a problem it will stop working in future.
	[patch] Attach to running but deleted executable
	http://sourceware.org/ml/gdb-patches/2010-03/msg00950.html

The problem is the patch above is not so useful as it still does not work for
deleted libraries, there was discussed some Linux kernel support like
/proc/PID/mappedfileshandlesdirectory/ but it probably has not happened yet.

Anyway one could also use gdbserver - which is probably the case your fix
targets IIUC, the testcase will regress with a fix like above.


> <date>  Aleksandar Ristovski  <aristovski@qnx.com>
> 
>         * solib-svr4.c (read_program_header): New variable pt_phdr,
> initialize
>         it from target PT_PHDR p_vaddr, relocate sect_addr by it.

There should be now two new variables pt_phdr and pt_phdr_p. :-)

OK with that ChangeLog change in a single commit with my testcase.


Thanks,
Jan


  reply	other threads:[~2011-10-18 13:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <j655em$75r$1@dough.gmane.org>
2011-10-12 18:50 ` Aleksandar Ristovski
2011-10-12 19:27   ` Jan Kratochvil
2011-10-16 19:42 ` Jan Kratochvil
2011-10-17 16:29   ` Aleksandar Ristovski
2011-10-18 13:41     ` Jan Kratochvil [this message]
2011-10-18 14:14       ` Aleksandar Ristovski

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=20111018133159.GA14219@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=aristovski@qnx.com \
    --cc=gdb-patches@sources.redhat.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