Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: qinwei@sunnorth.com.cn
Cc: gdb@sourceware.org
Subject: Re: A question about program entry point
Date: Fri, 29 Dec 2006 03:30:00 -0000	[thread overview]
Message-ID: <20061229033004.GA29846@nevyn.them.org> (raw)
In-Reply-To: <OF814186D1.2AE324F7-ON48257253.000A162B-48257253.0012D5BA@sunnorth.com.cn>

On Fri, Dec 29, 2006 at 11:26:33AM +0800, qinwei@sunnorth.com.cn wrote:
> Dears,
> 
> When printing a c++ class method using function "cp_print_class_method", 
> and the program entry point is 
> set over 0x80000000(for example 0xa0001000), gdb will treat the "addr" as 
> virtual address and finally
> goes into the "else" branch at the following, so gdb will not print out 
> the correct class method.

Take a look at the patch I just posted to gdb-patches.  I deleted the
check that's causing you trouble.

> /* Pointer to member function.  Depends on compiler implementation.  */
> 
> #define METHOD_PTR_IS_VIRTUAL(ADDR)  ((ADDR) & 0x80000000)
> #define METHOD_PTR_FROM_VOFFSET(OFFSET) (0x80000000 + (OFFSET))
> #define METHOD_PTR_TO_VOFFSET(ADDR) (~0x80000000 & (ADDR)) 

Note to myself.  I meant to delete these macros with my patch but
forgot to do so.  I deleted all the uses.

-- 
Daniel Jacobowitz
CodeSourcery


      reply	other threads:[~2006-12-29  3:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-29  3:24 qinwei
2006-12-29  3:30 ` Daniel Jacobowitz [this message]

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=20061229033004.GA29846@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=qinwei@sunnorth.com.cn \
    /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