Skip to content

Debuginfo in gdb shows this pointer in 'info functions' command #5064

@jerboaa

Description

@jerboaa

Describe the issue
Since 87722a0 some no-arg methods show up to take an argument in gdb when they shouldn't. Example:

File debug_symbols_smoke/ClassA.java:
37:	java.lang.String *debug_symbols_smoke.ClassA::toString(debug_symbols_smoke.ClassA *);

File debug_symbols_smoke/Main.java:
	void debug_symbols_smoke.Main$$Lambda$814/0x00000007c092c418::accept(debug_symbols_smoke.Main$$Lambda$814/0x00000007c092c418 *, java.lang.Object *);
50:	void debug_symbols_smoke.Main::lambda$thisIsTheEnd$0(java.io.ByteArrayOutputStream *, debug_symbols_smoke.ClassA *);
64:	void debug_symbols_smoke.Main::main(java.lang.String[] *);
49:	void debug_symbols_smoke.Main::thisIsTheEnd(java.util.List *);

should be something like this:

File debug_symbols_smoke/ClassA.java:
37:	java.lang.String *debug_symbols_smoke.ClassA::toString(void);

File debug_symbols_smoke/Main.java:
	void debug_symbols_smoke.Main$$Lambda$814/0x00000007c092c418::accept(java.lang.Object *);
50:	void debug_symbols_smoke.Main::lambda$thisIsTheEnd$0(debug_symbols_smoke.ClassA *);
64:	void debug_symbols_smoke.Main::main(java.lang.String[] *);
49:	void debug_symbols_smoke.Main::thisIsTheEnd(java.util.List *);

Steps to reproduce the issue

  1. git clone https://github.com/Karm/mandrel-integration-tests.git
  2. cd mandrel-integration-tests/apps/debug-symbols-smoke
  3. mvn clean package
  4. native-image -g -jar target/debug-symbols-smoke.jar
  5. gdb -ex 'set debuginfod enabled off' -ex 'set breakpoint pending on' -ex 'break main' -ex 'run' --args ./debug-symbols-smoke
GNU gdb (GDB) Fedora 12.1-1.fc36
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./debug-symbols-smoke...
Breakpoint 1 at 0x436940: main. (2 locations)
Starting program: /disk/graal/upstream-sources/mandrel-integration-tests/apps/debug-symbols-smoke/debug-symbols-smoke 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, com.oracle.svm.core.code.IsolateEnterStub::JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b (__0=1, __1=0x7fffffffda88) at com/oracle/svm/core/code/IsolateEnterStub.java:1
1	/*
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.35-17.fc36.x86_64 zlib-1.2.11-33.fc36.x86_64
(gdb) info functions .*smoke.*
All functions matching regular expression ".*smoke.*":

File debug_symbols_smoke/ClassA.java:
37:	java.lang.String *debug_symbols_smoke.ClassA::toString(debug_symbols_smoke.ClassA *);

File debug_symbols_smoke/Main.java:
	void debug_symbols_smoke.Main$$Lambda$814/0x00000007c092c418::accept(debug_symbols_smoke.Main$$Lambda$814/0x00000007c092c418 *, java.lang.Object *);
50:	void debug_symbols_smoke.Main::lambda$thisIsTheEnd$0(java.io.ByteArrayOutputStream *, debug_symbols_smoke.ClassA *);
64:	void debug_symbols_smoke.Main::main(java.lang.String[] *);
49:	void debug_symbols_smoke.Main::thisIsTheEnd(java.util.List *);
(gdb) quit

Describe GraalVM and your environment:

  • GraalVM version: revision 3d56567 from master
  • JDK major version: 17
  • OS: Linux
  • Architecture: AMD64

More details
Issue originally found here: Karm/mandrel-integration-tests#110

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions