[tb-developers] Finding out what JavaScript file and function is invoking C++ function from the gdb stacktrace

33 views
Skip to first unread message

ISHIKAWA,chiaki

unread,
Jan 24, 2025, 10:40:19 AM1/24/25
to dev-platform, Thunderbird Developers
Hi,

I would like to find out what JavaScript function (and in which file)
is reading startup.properties file.
See
https://bugzilla.mozilla.org/show_bug.cgi?id=1943506

I can get the stacktrace where the file is opened using gdb, but
the stacktrace only shows the JS interpreter and related functions and
I am not familiar with them to figure out the JavaScript file and function.

I looked into my .gdbinit file and found some references to old
DumpJSStack(), etc. But I am not sure if they are current or not.
Well, it seems it is related to Java and not to JavaScript.

Any tips will be appreciated.

TIA

Chiaki


Emilio Cobos Álvarez

unread,
Jan 24, 2025, 10:44:04 AM1/24/25
to Thunderbird Developers, dev-platform
DumpJSStack is the right thing to do, just:

call DumpJSStack()

From gdb, and it should print the JS caller to stderr.

 -- Emilio

--
You received this message because you are subscribed to the Google Groups "dev-pl...@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev-platform...@mozilla.org.
To view this discussion visit https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/50497ced-071a-4e48-b32d-05ce7dfcc7bf%40yk.rim.or.jp.


Reply all
Reply to author
Forward
0 new messages