debugging

How does one automatically attach a debugger to a process at process start on OS X?

戏子无情 提交于 2021-02-07 19:22:29
问题 I have a process that spawns a helper process. Sometimes I need to debug start-up failures in the second process. On Windows, I would use Image File Execution Options , or ntsd -o . However, I have no idea how to do this with gdb on OS X. 回答1: Use gdb --wait. For example, try gdb --wait TextEdit from the command line, then launch TextEdit. 回答2: I don't think that you can have gdb launch in the same manner. Instead, run your parent process from within gdb or attach to the running process

How does one automatically attach a debugger to a process at process start on OS X?

99封情书 提交于 2021-02-07 19:22:12
问题 I have a process that spawns a helper process. Sometimes I need to debug start-up failures in the second process. On Windows, I would use Image File Execution Options , or ntsd -o . However, I have no idea how to do this with gdb on OS X. 回答1: Use gdb --wait. For example, try gdb --wait TextEdit from the command line, then launch TextEdit. 回答2: I don't think that you can have gdb launch in the same manner. Instead, run your parent process from within gdb or attach to the running process

Missing separate debuginfos, use: debuginfo-install glibc-2.17-157.el7_3.1.x86_64

半世苍凉 提交于 2021-02-07 19:01:01
问题 I know this question is answered already in another thread, however I tried all the solutions given in the other thread including - Searching for the package, trying to install the package, installing yum-utils and debuginfo-install glibc Finally, I even set enabled=1 and gpgcheck=0 in redhat.repo under /etc/yum.repos.d, what else should be done for me to get rid of this error? What I am trying to do is, debug a program(using gdb) with a shared object library. The program and .so file are

GDB: Create local variable?

南笙酒味 提交于 2021-02-07 18:42:38
问题 I'm using Xcode's debugger. While stopped at a breakpoint, is there a command I can type in the GDB command prompt to create a local variable? If so, how? Please provide an example. I know I can do it in the code and then recompile the program, but I'm looking for a faster way. 回答1: It's mentioned in the comments, but not as an answer: if you don't need to reference the variable in your code but just want to do some ad-hoc investigation, you can use Convenience Variables Start your variable

Convert large core files to “minicore” files

时光总嘲笑我的痴心妄想 提交于 2021-02-07 18:40:19
问题 How do I reduce core files to just the threads' stacks? I want to be able to run gdb thread apply all bt on the mini core and no more I'm dealing with large (>4GB) multi-threaded Linux ELF core files that are too big to get back for analysis. I've see google-breakpad which is meant to create a "minidump" when a process crashes. In google-breakpad there are two utilities core2md and minidump-2-core which at first glance should be able to convert a core file to minidump format, and then back to

How can we enable debugging mode on google glass for testing an android app on google glass?

痴心易碎 提交于 2021-02-07 14:37:39
问题 I am develop an application for google glasses but I dont know How we enable debug mode in google glass and how we change setting on google glasses ? 回答1: To connect ADB to Google Glass, you have to turn on debug mode on the device. Turn the Glass on with a one second press of the power button if it is off. Tap the touchpad on the side to get to the time and voice prompt screen. Now swipe your finger on the touchpad toward the back of your head until you see the settings card. Tap the

How can we enable debugging mode on google glass for testing an android app on google glass?

我怕爱的太早我们不能终老 提交于 2021-02-07 14:35:00
问题 I am develop an application for google glasses but I dont know How we enable debug mode in google glass and how we change setting on google glasses ? 回答1: To connect ADB to Google Glass, you have to turn on debug mode on the device. Turn the Glass on with a one second press of the power button if it is off. Tap the touchpad on the side to get to the time and voice prompt screen. Now swipe your finger on the touchpad toward the back of your head until you see the settings card. Tap the

How to start debugger only when condition is met

烂漫一生 提交于 2021-02-07 14:27:33
问题 Assume I have a function which uses a loop over integer i . Now something goes wrong and I assume the error happens when i=5 . Now I can step through every single step (what I did up to now). But now I read about the condition and text argument of browser and debug : text a text string that can be retrieved when the browser is entered. condition a condition that can be retrieved when the browser is entered. Is it possible to use the arguments in a way it works as I want? Here is an example.

How to start debugger only when condition is met

笑着哭i 提交于 2021-02-07 14:24:25
问题 Assume I have a function which uses a loop over integer i . Now something goes wrong and I assume the error happens when i=5 . Now I can step through every single step (what I did up to now). But now I read about the condition and text argument of browser and debug : text a text string that can be retrieved when the browser is entered. condition a condition that can be retrieved when the browser is entered. Is it possible to use the arguments in a way it works as I want? Here is an example.

Is it possible to watch BufferedImage objects while debugging in IntelliJ?

馋奶兔 提交于 2021-02-07 14:20:25
问题 Is it possible to watch BufferedImage objects while debugging in IntelliJ? I mean to view visual content of an image, not memory identity. Is it also possible to view custom objects visually, i.e. write some custom visualizers? 回答1: IntelliJ IDEA 2016.1.1 is able to display BufferedImage object as image while debugging by default (probabily previous versions also support this feature). Set up a breakpoint where you can access the BufferedImage object By default, for BufferedImage class Idea