Re: [PATCH] Fix call functions command bug in 64-bit programs for AIX and PC read in psymtab-symtab warning

Ulrich Weigand via Gdb-patches
2023-04-18T10:13:00Z

>What I realised is the address that is being passed as GLOBALS
>looks bogus in the xcoffread.c file. I did not find it in object
>dump. The core address for which the psymtab entries made
>are 0 ,1a0, 0 and 8 for the below code.. These are not correct
>core addresses at all. I was surprised as to where it came from
>at first place.

>Seeing the comments around the same place in xcoffread.c file at
>the hunk lines of this patch , it looks like someone already knew
>these addresses are incorrect in the past. And even in my investigation
>I figured out that these psymbols are incorrect. Hence when function
>shared library addresses are looked up in psymtab GDB finds the
>nearest best false pysmtab symbol and returns it. Which it should not do.

Instead of simply disabling generation of those psymtab entries,
I think we should first understand why those values end up wrong.
Is this already a problem in the underlying XCOFF file debug info,
or is this just read in incorrectly by GDB/BFD at some point?

Can you debug a bit more exactly where the wrong values come from?
Is there some AIX tool you can use to look at the XCOFF debug info
directly to compare with what GDB is reading?

Bye,
Ulrich