mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 02:03:06 -05:00
bt: Show filenames and line numbers when available :^)
This commit is contained in:
parent
a4e087e685
commit
a883784376
Notes:
sideshowbarker
2024-07-18 22:35:29 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a8837843766
1 changed files with 7 additions and 1 deletions
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <AK/LogStream.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/EventLoop.h>
|
||||
|
@ -67,7 +68,12 @@ int main(int argc, char** argv)
|
|||
// FIXME: Support multiple threads in the same process!
|
||||
auto symbols = SymbolClient::symbolicate_thread(pid, pid);
|
||||
for (auto& symbol : symbols) {
|
||||
outln("{:p} {}", symbol.address, symbol.name);
|
||||
out("{:p} ", symbol.address);
|
||||
if (!symbol.name.is_empty())
|
||||
out("{} ", symbol.name);
|
||||
if (!symbol.filename.is_empty())
|
||||
out("(\033[34;1m{}\033[0m:{})", LexicalPath(symbol.filename).basename(), symbol.line_number);
|
||||
outln("");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue