Skip to content

Commit 95d1408

Browse files
committed
libcdb.unstrip_libc: debug symbols are fetched only if not present
* Usage of `ELF.debuginfo` to check if debug symbols exist closes #2324 --------- Signed-off-by: sswastik02 <[email protected]>
1 parent a2acdf9 commit 95d1408

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pwnlib/libcdb.py

+4
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,10 @@ def unstrip_libc(filename):
291291
log.warn_once('Given libc does not have a buildid. Cannot look for debuginfo to unstrip.')
292292
return False
293293

294+
if libc.debuginfo:
295+
log.debug('Given libc already contains debug information. Skipping unstrip.')
296+
return True
297+
294298
log.debug('Trying debuginfod servers: %r', DEBUGINFOD_SERVERS)
295299

296300
for server_url in DEBUGINFOD_SERVERS:

0 commit comments

Comments
 (0)