callstack

How to get the full call stack from Valgrind?

两盒软妹~` 提交于 2019-12-01 02:22:40
I run Valgrind with the following parameters: --leak-check=full --show-reachable=yes --leak-resolution=high --num-callers=100 --trace-children=yes In memory leaks log, I see some error messages with full stack trace up to main, but some messages look like following: ==3956== 1,999,140 (68,796 direct, 1,930,344 indirect) bytes in 5,733 blocks are definitely lost in loss record 8,842 of 8,845 ==3956== at 0x4022AB8: malloc (vg_replace_malloc.c:207) ==3956== How can I get the full stack trace for these errors? roelofs Getting the full stack trace will require debug symbols for all the libraries

In Python, how do I inspect and then re-raise an exception while maintaining the original call stack?

纵然是瞬间 提交于 2019-12-01 00:27:19
问题 I've got a situation where I'm catching a specific exception type, inspecting the exception's message to check if it's actually an exception I want to catch, and then re-raising the exception if not: try: # do something exception-prone except FooException as e: if e.message == 'Something I want to handle': # handle the exception else: raise e This works fine, with one problem. In the case I re-raise the exception, that exception now occurs at the line I re-raised it (i.e. at raise e ), rather

How to get the full call stack from Valgrind?

谁说我不能喝 提交于 2019-11-30 21:57:32
问题 I run Valgrind with the following parameters: --leak-check=full --show-reachable=yes --leak-resolution=high --num-callers=100 --trace-children=yes In memory leaks log, I see some error messages with full stack trace up to main, but some messages look like following: ==3956== 1,999,140 (68,796 direct, 1,930,344 indirect) bytes in 5,733 blocks are definitely lost in loss record 8,842 of 8,845 ==3956== at 0x4022AB8: malloc (vg_replace_malloc.c:207) ==3956== How can I get the full stack trace for

Function Call Stack in C++

倾然丶 夕夏残阳落幕 提交于 2019-11-30 21:26:28
I have tried the following links, from StackOverflow and other sites,[I tried, but it didn't helped me, so i can't avoid duplicating] StackWalk64 on Windows - Get symbol name How do you make StackWalk64() work successfully on x64? http://www.codeproject.com/KB/threads/StackWalker.aspx http://jpassing.com/2008/03/12/walking-the-stack-of-the-current-thread/ How to Log Stack Frames with Windows x64 ... But none of the Code worked for me.I'm new to Windows C++ environment and i can't get any of the above code to work. I'm looking for a call stack format like, FUNCTION_NAME_DEPTH_1 : _LINE_NUM__

Get objects involved in Java stacktrace

纵然是瞬间 提交于 2019-11-30 20:26:22
I can retreive the current stacktrace using Thread.currentThread().getStackTrace() but this gives me only the classes involved in the call. Is it possible to retreive the object instances involved in the call trace? Maybe some kind of library which allows me to retreive the objects from the heap? I have a problem which requires me to trace back to a Spring bean which indirectly created the object where i'm requesting the stack trace. UPDATE If there's no builtin tool for this in Java i'm searching for an embeddable library which can do this for me in runtime. It is a very interesting idea, but

Show special primitive functions in call stack

放肆的年华 提交于 2019-11-30 19:59:49
This question prompted the following question: Is there a way to view the special primitive functions that are in the call stack? For example, create a function that returns the call stack on exit: myFun <- function(obj){ on.exit(print(sys.calls())) return(obj) } Calling this function and assigning its result to an object using assign avoids using special primitive functions: > assign("myObj",myFun(4)) [[1]] assign("myObj", myFun(4)) [[2]] myFun(4) But using the assignment operator, this gets left out of the stack > `<-`(myObj, myFun(6)) [[1]] myFun(6) Granted, it might not be all that common

Function Call Stack in C++

旧街凉风 提交于 2019-11-30 17:36:35
问题 I have tried the following links, from StackOverflow and other sites,[I tried, but it didn't helped me, so i can't avoid duplicating] StackWalk64 on Windows - Get symbol name How do you make StackWalk64() work successfully on x64? http://www.codeproject.com/KB/threads/StackWalker.aspx http://jpassing.com/2008/03/12/walking-the-stack-of-the-current-thread/ How to Log Stack Frames with Windows x64 ... But none of the Code worked for me.I'm new to Windows C++ environment and i can't get any of

How do you find the caller function? [duplicate]

时光毁灭记忆、已成空白 提交于 2019-11-30 15:15:32
Closed as exact duplicate of "How can I find the method that called the current method?" Is this possible with c#? void main() { Hello(); } void Hello() { // how do you find out the caller is function 'main'? } Console.WriteLine(new StackFrame(1).GetMethod().Name); However, this is not robust, especially as optimisations (such as JIT inlining) can monkey with the perceived stack frames. From here : System.Diagnostics.StackTrace st = new System.Diagnostics.StackTrace(1); System.Diagnostics.StackFrame sf = st.GetFrame(0); string msg = sf.GetMethod().DeclaringType.FullName + "." + sf.GetMethod()

Split stacks unneccesary on amd64

心不动则不痛 提交于 2019-11-30 14:49:09
问题 There seems to be an opinion out there that using a "split stack" runtime model is unnecessary on 64-bit architectures. I say seems to be, because I haven't seen anyone actually say that, only dance around it: The memory usage of a typical multi-threaded program can decrease significantly, as each thread does not require a worst-case stack size. It becomes possible to run millions of threads (either full NPTL threads or co-routines) in a 32-bit address space. -- Ian Lance Taylor ...implying

Why is there a limit on the stack size? [duplicate]

六月ゝ 毕业季﹏ 提交于 2019-11-30 14:25:26
Possible Duplicate: What and where are the stack and heap My installation of Ubuntu has a default stack size limit of 8 MB. But I am curious as to why we need to restrict a user program's stack size. The same program can use all of its 4 GB (for a 32 bit program) addressable space via malloc/mmap etc. So why do we need a stack size limit? Why can't the stack grow till it almost meets the heap? In fact the stack does grow more and more. It doesn't need to start very big since in the general case, it doesn't need to be very big. Having it as very big results in a wasteful memory footprint. I'm