mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
hashmap: Drop debug params
Passing in the func, file and line information complicates the interface. On top of that, it prevents forward declaring Hashmap in strv.h, as we need to pass the macros everywhere that we allocate a hashmap, which means we have to include the hashmap header everywhere we have a function that allocates a hashmap instead of just having to forward declare Hashmap. Let's drop the file, func and line information from the debug information. Instead, in the future we can add a description field to hashmaps like we already have in various other structs to describe the purpose of the hashmap which should be much more useful than having the file, line and function where the hashmap was allocated.
This commit is contained in:
@@ -32,7 +32,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"].string()}, {d["file"].string()}:{d["line"]}')
|
||||
print(f'{t}, {h["hash_ops"]}, {bool(h["has_indirect"])}, {n_entries}, {d["max_entries"]}, {n_buckets}')
|
||||
|
||||
if arg != "" and n_entries > 0:
|
||||
dib_raw_addr = storage_ptr + hashmap_type_info[h["type"]]["entry_size"] * n_buckets
|
||||
|
||||
Reference in New Issue
Block a user