DebugBreak in Unix/ Linux?
Asked Answered
P

2

9

Do we have similar windows API of DebugBreak in Unix/ Linux. I want to debug a daemon process which should open NetBeans when DebugBreak statement is executed. Thanks in advance.

Priam answered 27/9, 2011 at 9:39 Comment(0)
P
2

Whav! this is what I am looking for Embedded break points in C http://mainisusuallyafunction.blogspot.in/2012/01/embedding-gdb-breakpoints-in-c-source.html and to get sample program have a look in to https://github.com/kmcallister/embedded-breakpoints

Priam answered 11/4, 2012 at 5:54 Comment(0)
N
9

there is __builtin_trap() GCC intrinsic.

Nikolaus answered 27/9, 2011 at 9:41 Comment(2)
Whav! this is what I am looking for mainisusuallyafunction.blogspot.in/2012/01/… and to get sample program have a look in to github.com/kmcallister/embedded-breakpointsPriam
This causes SIGILL (illegal instruction) when hit, and subsequently kills the program. At least for me. Using raise(SIGTRAP) works.Callender
P
2

Whav! this is what I am looking for Embedded break points in C http://mainisusuallyafunction.blogspot.in/2012/01/embedding-gdb-breakpoints-in-c-source.html and to get sample program have a look in to https://github.com/kmcallister/embedded-breakpoints

Priam answered 11/4, 2012 at 5:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.