Skip to content

GDB: Line numbers off, Thread names missing characters, Quarkus: galderz/quarkus/tree/t_sourcecache_container_12283 #141

@Karm

Description

@Karm

Description

  • After some stepping, line numbers are off. It looks like the line numbers are off as soon as JDK sources are entered.
  • Thread names are missing first characters, e.g. Thread 4 "ecutor-thread-1" instead of expected Thread 4 "Executor-thread-1"

The former is an issue. The latter is just a nuisance.

How To Reproduce

Mind the location /tmp/ or adjust the set directories.

unzip quarkus-full-microprofile.zip -d /tmp

cd /tmp/quarkus-full-microprofile
export JAVA_HOME=~/workspaceRH/mandrel-release/mandrel-java11-20.1.0.2.Final/;export GRAALVM_HOME=${JAVA_HOME};export PATH=${JAVA_HOME}/bin:${PATH} 
mvn clean compile package -Pnative -Dquarkus.native.debug.enabled=true
mvn dependency:sources
gdb ./target/quarkus-runner
set directories  /tmp/quarkus-full-microprofile/target/quarkus-native-image-source-jar/sources/:/tmp/quarkus-full-microprofile/target/quarkus-native-image-source-jar/sources/src/
(gdb)  b ConfigTestController.java:33
Breakpoint 1 at 0x40960a: file com/example/quarkus/config/ConfigTestController.java, line 33.
(gdb) run&
shell curl http://localhost:8080/data/config/lookup &

Thread 4 "ecutor-thread-1" hit Breakpoint 1, com.example.quarkus.config.ConfigTestController::getLookupConfigValue()void () at com/example/quarkus/config/ConfigTestController.java:33
33          String value = config.getValue("value", String.class);
s
io.smallrye.config.SmallRyeConfig::getValue(java.lang.String, java.lang.Class)()void () at io/smallrye/config/SmallRyeConfig.java:140
140         return getValue(name, getConverter(aClass));
(gdb) s
io.smallrye.config.SmallRyeConfig::getConverter(java.lang.Class)()void () at io/smallrye/config/SmallRyeConfig.java:272
272         final Converter<?> exactConverter = converters.get(asType);
(gdb) s
java.util.concurrent.ConcurrentHashMap::get(java.lang.Object)()void () at java.base/java/util/concurrent/ConcurrentHashMap.java:936
936         int h = spread(key.hashCode());
(gdb) s
java.lang.Object::hashCode()void () at java.base/java/lang/Object.java:105
105      * @see     java.lang.Object#equals(java.lang.Object)
(gdb) s
java.lang.System::identityHashCode(java.lang.Object)()void () at java.base/java/lang/System.java:297
297      *

(gdb) c&
Continuing.
(gdb) Config value from ConfigProvider lookup value 

(the last sentence ending in "lookup value" is expected output of the web app)

e.g. java.base/java/lang/System.java:297 is actually inside a comment...

 294 
 295     /**
 296      * Sets the System security.
 297      *
 298      * If there is a security manager already installed, this method first
 299      * calls the security manager's {@code checkPermission} method
 300      * with a {@code RuntimePermission("setSecurityManager")}
 301      * permission to ensure it's ok to replace the existing
 302      * security manager.
 303      * This may result in throwing a {@code SecurityException}.
 304      *
 305      * <p> Otherwise, the argument is established as the current

Configuration:

  • OS: Fedora
  • GDB: 7.12
  • Architecture: AMD64
  • Mandrel version: 20.1.0.2.Final
  • JDK version: OpenJDK 11.0.8+10

Expected behavior

Line numbers match the code all the way.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions