@@ -410,31 +410,31 @@ static bool DumpAddressAndContent(Stream &s, const SymbolContext *sc,
410
410
const Address &addr,
411
411
bool print_file_addr_or_load_addr) {
412
412
Target *target = Target::GetTargetFromContexts (exe_ctx, sc);
413
+
413
414
addr_t vaddr = LLDB_INVALID_ADDRESS;
414
- if (exe_ctx && !target->GetSectionLoadList ().IsEmpty ())
415
+ if (target && !target->GetSectionLoadList ().IsEmpty ())
415
416
vaddr = addr.GetLoadAddress (target);
416
417
if (vaddr == LLDB_INVALID_ADDRESS)
417
418
vaddr = addr.GetFileAddress ();
419
+ if (vaddr == LLDB_INVALID_ADDRESS)
420
+ return false ;
418
421
419
- if (vaddr != LLDB_INVALID_ADDRESS) {
420
- int addr_width = 0 ;
421
- if (exe_ctx && target) {
422
- addr_width = target->GetArchitecture ().GetAddressByteSize () * 2 ;
423
- }
424
- if (addr_width == 0 )
425
- addr_width = 16 ;
426
- if (print_file_addr_or_load_addr) {
427
- ExecutionContextScope *exe_scope = nullptr ;
428
- if (exe_ctx)
429
- exe_scope = exe_ctx->GetBestExecutionContextScope ();
430
- addr.Dump (&s, exe_scope, Address::DumpStyleLoadAddress,
431
- Address::DumpStyleModuleWithFileAddress, 0 );
432
- } else {
433
- s.Printf (" 0x%*.*" PRIx64, addr_width, addr_width, vaddr);
434
- }
435
- return true ;
422
+ int addr_width = 0 ;
423
+ if (target)
424
+ addr_width = target->GetArchitecture ().GetAddressByteSize () * 2 ;
425
+ if (addr_width == 0 )
426
+ addr_width = 16 ;
427
+
428
+ if (print_file_addr_or_load_addr) {
429
+ ExecutionContextScope *exe_scope =
430
+ exe_ctx ? exe_ctx->GetBestExecutionContextScope () : nullptr ;
431
+ addr.Dump (&s, exe_scope, Address::DumpStyleLoadAddress,
432
+ Address::DumpStyleModuleWithFileAddress, 0 );
433
+ } else {
434
+ s.Printf (" 0x%*.*" PRIx64, addr_width, addr_width, vaddr);
436
435
}
437
- return false ;
436
+
437
+ return true ;
438
438
}
439
439
440
440
static bool DumpAddressOffsetFromFunction (Stream &s, const SymbolContext *sc,
0 commit comments