Closed Bug 1828038 Opened 2 years ago Closed 2 years ago

[gdb pretty printers] gdb.error No type named jsstring

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: tjr, Unassigned)

References

(Blocks 1 open bug)

Details

+++ This bug was initially created as a clone of Bug #1739321 +++

I seem to be experiencing the same issue as Bug #1739321:

 0:00.48 /usr/bin/gdb -q --args /home/tom/Documents/moz/mozilla-unified-5/obj-x86_64-pc-linux-gnu/dist/bin/firefox -no-remote -profile /home/tom/Documents/moz/mozilla-unified-5/obj-x86_64-pc-linux-gnu/tmp/profile-default
Reading symbols from /home/tom/Documents/moz/mozilla-unified-5/obj-x86_64-pc-linux-gnu/dist/bin/firefox...
(gdb) run
Starting program: /home/tom/Documents/moz/mozilla-unified-5/obj-x86_64-pc-linux-gnu/dist/bin/firefox -no-remote -profile /home/tom/Documents/moz/mozilla-unified-5/obj-x86_64-pc-linux-gnu/tmp/profile-default
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff54ff700 (LWP 3601400)]
[Thread 0x7ffff54ff700 (LWP 3601400) exited]
[Detaching after fork from child process 3601401]
Dwarf Error: DW_FORM_strx1 found in non-DWO CU [in module /home/tom/Documents/moz/mozilla-unified-5/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so]
Loading JavaScript value pretty-printers; see js/src/gdb/README.
If they cause trouble, type: disable pretty-printer .* SpiderMonkey
Traceback (most recent call last):
  File "/home/tom/Documents/moz/mozilla-unified-5/js/src/gdb/mozilla/prettyprinters.py", line 219, in __init__
    self.JSString_ptr_t = gdb.lookup_type("JSString").pointer()
gdb.error: No type named JSString.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tom/Documents/moz/mozilla-unified-5/obj-x86_64-pc-linux-gnu/build/.gdbinit.py", line 10, in <module>
    mozilla.autoload.register(gdb.current_objfile())
  File "/home/tom/Documents/moz/mozilla-unified-5/js/src/gdb/mozilla/autoload.py", line 41, in register
    mozilla.unwind.register_unwinder(objfile)
  File "/home/tom/Documents/moz/mozilla-unified-5/js/src/gdb/mozilla/unwind.py", line 585, in register_unwinder
    type_cache = UnwinderTypeCache()
  File "/home/tom/Documents/moz/mozilla-unified-5/js/src/gdb/mozilla/unwind.py", line 79, in __init__
    super(UnwinderTypeCache, self).__init__(None)
  File "/home/tom/Documents/moz/mozilla-unified-5/js/src/gdb/mozilla/prettyprinters.py", line 223, in __init__
    raise NotSpiderMonkeyObjfileError
mozilla.prettyprinters.NotSpiderMonkeyObjfileError
warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
of file /home/tom/Documents/moz/mozilla-unified-5/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so.
Use `info auto-load python-scripts [REGEXP]' to list them.

I don't know if these are two issues, or the same one: gdb.error: No type named JSString. and Missing auto-load script at offset 0 in section .debug_gdb_scripts . Since both were present in the old bug, probably related?

I looked at Bug 1739321 and Bug 1747269 but saw no obvious reason why this would recur. I am compiling with clang version 16.0.0 (taskcluster-Y9nEX9BVRQKDt52MITUIdQ).

Blocks: 1736620

Steve, you've looked at something like this before...

Severity: -- → S3
Flags: needinfo?(sphink)
Priority: -- → P3

First check: does adding the -fstandalone-debug compile option fix it?

Data point: I am compiling locally with the mozbuild clang 16.0.0, and I don't see it.

What is the output of:
(gdb) info types JSString$
(gdb) ptype JSString
objdump -W $objdir/js/src/Unified_cpp_js_src22.o | egrep -C6 'DW_AT_name.*JS(Linear)?String$'

(or at least, that's where my StringType.cpp ended up; you can check with grep StringType.cpp $objdir/js/src/*.cpp)

Flags: needinfo?(tom)

I was running gdb 9 on Ubuntu 20.04 LTS which was pretty old. I was convinced to do a dist upgrade to 22.04 which came with gdb 12 and fixed the issue, whatever it was. I'm going to assume it's not worth digging into further and close this.

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(tom)
Resolution: --- → WONTFIX
Flags: needinfo?(sphink)
You need to log in before you can comment on or make changes to this bug.