Dont panic if .debug_frame section is not found. Log and exit
This commit is contained in:
parent
d9c3488f12
commit
d7e535f25b
@ -109,13 +109,17 @@ func (dbp *DebuggedProcess) findExecutable() (*elf.File, error) {
|
||||
func (dbp *DebuggedProcess) parseDebugFrame(exe *elf.File, wg *sync.WaitGroup) {
|
||||
defer wg.Done()
|
||||
|
||||
if sec := exe.Section(".debug_frame"); sec != nil {
|
||||
debugFrame, err := exe.Section(".debug_frame").Data()
|
||||
if err != nil {
|
||||
fmt.Println("could not get .debug_frame section", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
dbp.FrameEntries = frame.Parse(debugFrame)
|
||||
} else {
|
||||
fmt.Println("No debug symbols found")
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func (dbp *DebuggedProcess) obtainGoSymbols(exe *elf.File, wg *sync.WaitGroup) {
|
||||
|
Loading…
Reference in New Issue
Block a user