]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
gdb: make output a bit nicer
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 May 2020 11:28:11 +0000 (13:28 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 30 May 2020 09:40:53 +0000 (11:40 +0200)
Now: set, 0x7f19be8f7c20 <string_hash_ops>, False, 1, 1, 4, unit_new, src/core/unit.c:96

tools/gdb-sd_dump_hashmaps.py

index 013754449fa646b506d4c9b4638c1e901b77a074..66018a54fd4b6fe9d4ae35bd012023948e4bd8e0 100644 (file)
@@ -31,7 +31,7 @@ class sd_dump_hashmaps(gdb.Command):
 
             t = ["plain", "ordered", "set"][int(h["type"])]
 
-            print(f'{t}, {h["hash_ops"]}, {bool(h["has_indirect"])}, {n_entries}, {d["max_entries"]}, {n_buckets}, {d["func"]}, {d["file"]}, {d["line"]}')
+            print(f'{t}, {h["hash_ops"]}, {bool(h["has_indirect"])}, {n_entries}, {d["max_entries"]}, {n_buckets}, {d["func"].string()}, {d["file"].string()}:{d["line"]}')
 
             if arg != "" and n_entries > 0:
                 dib_raw_addr = storage_ptr + hashmap_type_info[h["type"]]["entry_size"] * n_buckets