debugging

What's the difference between a compiler's `-O0` option and `-Og` option?

元气小坏坏 提交于 2020-08-17 04:47:05
问题 When I want to do debugging of C or C++ programs, I've been taught to use -O0 to turn optimization OFF, and -ggdb to insert symbols into the executable which are optimized for using the GNU gdb debugger, which I use (or, you can use -glldb for LLVM/clang's lldb debugger, or just -g for general debugging symbols, but that won't be as good as -ggdb apparently...). However, I recently stumbled upon someone saying to use -Og (instead of -O0 ), and it caught me off-guard. Sure enough though, it's

What's the difference between a compiler's `-O0` option and `-Og` option?

∥☆過路亽.° 提交于 2020-08-17 04:45:29
问题 When I want to do debugging of C or C++ programs, I've been taught to use -O0 to turn optimization OFF, and -ggdb to insert symbols into the executable which are optimized for using the GNU gdb debugger, which I use (or, you can use -glldb for LLVM/clang's lldb debugger, or just -g for general debugging symbols, but that won't be as good as -ggdb apparently...). However, I recently stumbled upon someone saying to use -Og (instead of -O0 ), and it caught me off-guard. Sure enough though, it's

switching between threads in Intellij Idea

旧巷老猫 提交于 2020-08-17 03:33:39
问题 How to switch between threads of a suspended program? or Any tutorial on multi-threaded debugging with Intellij Idea describing basic features - suspend, resume, switch between threads. very good tutorials/step-by-step guide available for Netbeans: e.g. https://netbeans.org/kb/docs/java/debug-multithreaded.html 回答1: Trick is to set breakpoint suspend policy to - Thread. View breakpoint properties (right-click on breakpoint) Once done threads will hit breakpoint and block, now active thread

Apps Script debugger won't let me look at values in objects (including arrays and block scopes)

删除回忆录丶 提交于 2020-08-15 05:41:31
问题 I'm trying to debug an Apps Script project, and for the past 2–3 days, the debugger hasn't let me look at variables defined at the scope level. For example, I was trying to debug this code. /** * Deletes all rows in a sheet, excluding header rows. Just calling sheet.deleteRows() * for a massive range of rows will throw out an error. * @private * * @param {Sheet} sheet * @param {number = 0} numHeaderRows * @param {number = 500} deletionSize - The number of rows to delete at a time */ function

Apps Script debugger won't let me look at values in objects (including arrays and block scopes)

ぃ、小莉子 提交于 2020-08-15 05:40:41
问题 I'm trying to debug an Apps Script project, and for the past 2–3 days, the debugger hasn't let me look at variables defined at the scope level. For example, I was trying to debug this code. /** * Deletes all rows in a sheet, excluding header rows. Just calling sheet.deleteRows() * for a massive range of rows will throw out an error. * @private * * @param {Sheet} sheet * @param {number = 0} numHeaderRows * @param {number = 500} deletionSize - The number of rows to delete at a time */ function

How to attach a process to the current debugger programmatically?

ε祈祈猫儿з 提交于 2020-08-11 04:04:07
问题 I have 2 projects in the solution that compile to A.exe and B.exe . A will start B and connect to it through a pipe. I want to test the connection between them so I'd like to attach to both at the same time. Doing that manually every time is very inconvenient so I tried this if(IsDebuggerPresent()) DebugActiveProcess(processId); However it seems B is attached to A's debugger instead of Visual Studio's debugger. So how can I attach B to VS debugger automatically? I have windbg at hand for

switching between threads in Intellij Idea

↘锁芯ラ 提交于 2020-08-10 19:20:29
问题 How to switch between threads of a suspended program? or Any tutorial on multi-threaded debugging with Intellij Idea describing basic features - suspend, resume, switch between threads. very good tutorials/step-by-step guide available for Netbeans: e.g. https://netbeans.org/kb/docs/java/debug-multithreaded.html 回答1: Trick is to set breakpoint suspend policy to - Thread. View breakpoint properties (right-click on breakpoint) Once done threads will hit breakpoint and block, now active thread

protect python code from reverse engineering

有些话、适合烂在心里 提交于 2020-08-08 07:17:32
问题 I'm creating a program in python (2.7) and I want to protect it from reverse engineering. I compiled it using cx_freeze (supplies basic security- obfuscation and anti-debugging) How can I add more protections such as obfuscation, packing, anti-debugging, encrypt the code recognize VM. I thought maybe to encrypt to payload and decrypt it on run time, but I have no clue how to do it. 回答1: Generally speaking, it's almost impossible for you to make your program unbreakable as long as there's

ionic cordova run ios - Export failed with code 65

末鹿安然 提交于 2020-08-07 05:38:06
问题 I'm done with research on this error. I get following error when trying to run ionic cordova run ios --livereload : [cordova] Non-system Ruby in use. This may cause packaging to fail. [cordova] If you use RVM, please run `rvm use system`. [cordova] If you use chruby, please run `chruby system`. [cordova] error: archive not found at path '/Users/yassinezeriouh/Desktop/doday2/platforms/ios/DoDay.xcarchive' [cordova] ** EXPORT FAILED ** [cordova] [cordova] CordovaError: Promise rejected with non

module 'xlwings' has no attribute 'Book'

爷,独闯天下 提交于 2020-08-05 10:05:48
问题 I'm trying to use xlwings for the first time but I can't quite understand the documentation. From the section "Quickstart" I read import xlwings as xw wb = xw.Book() # this will create a new workbook When I try this "at home", I have no problem importing xlwings but with the second script I get this error: AttributeError: module 'xlwings' has no attribute 'Book' When I try to see the attributes of xw I can see AboveBelow,ActionTime etc. but not Book. Can you help please? Thank you very much.