Skip to content

Commit

Permalink
Fix getattr self.ql.loader default value
Browse files Browse the repository at this point in the history
  • Loading branch information
dotCirill committed Dec 25, 2023
1 parent cf16320 commit f32fbe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qiling/debugger/qdb/qdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def bp_handler(ql, address, size, bp_list):
self.init_state = self.ql.save()

# stop emulator once interp. have been done emulating
if addr_elf_entry := getattr(self.ql.loader, 'elf_entry'):
if addr_elf_entry := getattr(self.ql.loader, 'elf_entry', None):
handler = self.ql.hook_address(lambda ql: ql.stop(), addr_elf_entry)
else:
handler = self.ql.hook_address(lambda ql: ql.stop(), self.ql.loader.entry_point)
Expand Down Expand Up @@ -555,7 +555,7 @@ def do_show(self, keyword: Optional[str] = None, *args) -> None:

qdb_print(QDB_MSG.INFO, f"Entry point: {self.ql.loader.entry_point:#x}")

if addr_elf_entry := getattr(self.ql.loader, 'elf_entry'):
if addr_elf_entry := getattr(self.ql.loader, 'elf_entry', None):
qdb_print(QDB_MSG.INFO, f"ELF entry: {addr_elf_entry:#x}")

info_lines = iter(self.ql.mem.get_formatted_mapinfo())
Expand Down

0 comments on commit f32fbe9

Please sign in to comment.