This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: A question about program entry point
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