mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:17:44 +00:00
bt: Show filenames and line numbers when available :^)
This commit is contained in:
parent
a4e087e685
commit
a883784376
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.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <AK/LexicalPath.h>
|
||||||
#include <AK/LogStream.h>
|
#include <AK/LogStream.h>
|
||||||
#include <LibCore/ArgsParser.h>
|
#include <LibCore/ArgsParser.h>
|
||||||
#include <LibCore/EventLoop.h>
|
#include <LibCore/EventLoop.h>
|
||||||
|
@ -67,7 +68,12 @@ int main(int argc, char** argv)
|
||||||
// FIXME: Support multiple threads in the same process!
|
// FIXME: Support multiple threads in the same process!
|
||||||
auto symbols = SymbolClient::symbolicate_thread(pid, pid);
|
auto symbols = SymbolClient::symbolicate_thread(pid, pid);
|
||||||
for (auto& symbol : symbols) {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue