debugging

How to create a core dump even if the process is normally running? [duplicate]

◇◆丶佛笑我妖孽 提交于 2020-01-12 03:13:08
问题 This question already has answers here : Is it possible to get a core dump of a running process and its symbol table? (4 answers) Closed 5 years ago . Under Linux, when a process crashes, a core dump will be created. However, I want to create a core dump when the process doesn't crash, but looks buggy. A remote expert need the core dump to analyze. Under Windows, we can create a dump file of a process through task manager, and after that, the process is still running. Is it possible under

Multithread debugging techniques

﹥>﹥吖頭↗ 提交于 2020-01-12 02:34:08
问题 I was wondering if anyone knows of a nice survey of debugging techniques for multithreaded applications. Ideally, I'm looking for a case-based analysis: deadlocks, starvation, corrupted shared state, ... .Net specific, or generic. 回答1: I'm not aware of an article or book that addresses what you're looking for, so here's my "lessons learned" from 12 years of multithreaded debugging on Windows (both unmanaged and managed). As I stated in my comment, most of my "multithreaded debugging" is

How to easily “Show Layout bounds” for Android debugging?

大兔子大兔子 提交于 2020-01-12 01:16:40
问题 I want to watch the layout of App without boring tap and tap. I tried adb shell setprop debug.layout true but didn't work unless reboot or open setting. This may caused by setting haven't update. I tried to writing a little App with code SystemProperties.set("debug.layout", "true") , no use too. Maybe the app's authority… Sorry for my poor English and appreciation for help :p 回答1: This works for me: adb shell setprop debug.layout true adb shell service call activity 1599295570 After we have

How to easily “Show Layout bounds” for Android debugging?

点点圈 提交于 2020-01-12 01:16:21
问题 I want to watch the layout of App without boring tap and tap. I tried adb shell setprop debug.layout true but didn't work unless reboot or open setting. This may caused by setting haven't update. I tried to writing a little App with code SystemProperties.set("debug.layout", "true") , no use too. Maybe the app's authority… Sorry for my poor English and appreciation for help :p 回答1: This works for me: adb shell setprop debug.layout true adb shell service call activity 1599295570 After we have

undebug all functions

天涯浪子 提交于 2020-01-11 19:57:50
问题 Consider we have called debug() for several functions to make a breakpoint on them. When we find and solve the bug, is there anyway to undebug() all functions already marked by debug() by a single command? Here is a good benchmark to see if your proposed method really works perfectly: > library(limma) # bioconductor > debug(read.ilmn) > read.ilmn("a.txt") # No problem if this file does not exist Browse[2]> debug(.read.oneilmnfile) # This is the debug browser for read.ilmn() Browse[2]> Q # To

Watch points on memory address

本秂侑毒 提交于 2020-01-11 19:18:11
问题 With the new change from gdb to lldb , I can't find a way how to set watch points on some memory addresses . In gdb I used this watch -location *0x123456 Doing the same in lldb w s e *0x123456 Isn't working for me . So what can I use to run the same command in lldb ? 回答1: Omit the "dereferencing operator" * when setting the watch point in lldb, just pass the address: watchpoint set expression -- 0x123456 # short form: w s e -- 0x123456 sets a watchpoint at the memory location 0x123456 .

Watch points on memory address

可紊 提交于 2020-01-11 19:16:33
问题 With the new change from gdb to lldb , I can't find a way how to set watch points on some memory addresses . In gdb I used this watch -location *0x123456 Doing the same in lldb w s e *0x123456 Isn't working for me . So what can I use to run the same command in lldb ? 回答1: Omit the "dereferencing operator" * when setting the watch point in lldb, just pass the address: watchpoint set expression -- 0x123456 # short form: w s e -- 0x123456 sets a watchpoint at the memory location 0x123456 .

Watch points on memory address

Deadly 提交于 2020-01-11 19:15:41
问题 With the new change from gdb to lldb , I can't find a way how to set watch points on some memory addresses . In gdb I used this watch -location *0x123456 Doing the same in lldb w s e *0x123456 Isn't working for me . So what can I use to run the same command in lldb ? 回答1: Omit the "dereferencing operator" * when setting the watch point in lldb, just pass the address: watchpoint set expression -- 0x123456 # short form: w s e -- 0x123456 sets a watchpoint at the memory location 0x123456 .

How to use pg_stat_activity?

限于喜欢 提交于 2020-01-11 16:38:32
问题 I'd like to see which queries are being executed on a live Django application, and how much memory they are taking up. I have read that pg_stat_activity can be useful to monitor a Postgres database. I have looked at the Postgres documentation, but I have a very simple question that doesn't seem to be answered there. How do I actually get started with pg_stat_activity ? What do I type to use it, and where do I type it? 回答1: See this closely related answer. pg_stat_activity is a view in the pg

How do i debug a web application running on jetty in eclipse?

橙三吉。 提交于 2020-01-11 15:44:30
问题 never done web programming before. Is there a way to set breakpoints, see variable values in eclipse? The app i want to debug makes a Query string whcih i would like to easily extract. 回答1: Click External Tools Config, Select program and click the new button top left. Set location to your maven binary working directory to local workspace and arguments to jetty:run In the environment tab set the maven opts. Notice socket address = 4000 and suspend=y The go to debug configurations and add a new