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) {
|
func (dbp *DebuggedProcess) parseDebugFrame(exe *elf.File, wg *sync.WaitGroup) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
|
|
||||||
debugFrame, err := exe.Section(".debug_frame").Data()
|
if sec := exe.Section(".debug_frame"); sec != nil {
|
||||||
if err != nil {
|
debugFrame, err := exe.Section(".debug_frame").Data()
|
||||||
fmt.Println("could not get .debug_frame section", err)
|
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)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
dbp.FrameEntries = frame.Parse(debugFrame)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dbp *DebuggedProcess) obtainGoSymbols(exe *elf.File, wg *sync.WaitGroup) {
|
func (dbp *DebuggedProcess) obtainGoSymbols(exe *elf.File, wg *sync.WaitGroup) {
|
||||||
|
Loading…
Reference in New Issue
Block a user