trace

How to get calling expression when tracing a Python function?

☆樱花仙子☆ 提交于 2019-12-04 23:42:13
问题 When inside tracing function, debugging a function call, is it possible to somehow retrieve the calling expression? I can get calling line number from traceback object but if there are several function calls (possibly to the same function) on that line (eg. as subexpression in a bigger expression) then how could I learn where this call came from? I would be happy even with the offset from start of the source line. traceback.tb_lasti seems to give more granual context (index of last bytecode

System.Net tracing in Powershell

坚强是说给别人听的谎言 提交于 2019-12-04 20:33:09
I am trying to get tracing set up for Powershell(ISE) and I came across this link , but I am running debugView, and nothing seems to be happening. Anyone know what I am doing wrong? Basically my goal is to get tracing for System.Net.Webrequest working in powershell. If there is another way to do it, I'd also be open to that. The answer - which is mine funnily enough - in that link refers to the regular console (powershell.exe) version of powershell. I have to ask some dumb questions: You created a powershell_ise.exe.config file, not powershell.exe.config, right? If you're viewing dbgview over

Adding dynamic tracepoint through perf in Linux for function that is not listed

£可爱£侵袭症+ 提交于 2019-12-04 20:18:43
I am trying to trace function zap_pte_range from mm/memory.c using perf . But function is not listed in the perf probe -F . So is there a way to dynamically trace this function? I.e. with explicitly adding the tracepoint and recompiling the kernel? perf probe -a zap_pte_range gives: [kernel.kallsyms] with build id 33b15ec444475ee7806331034772f61666fa6719 not found, continuing without symbols Failed to find symbol zap_pte_range in kernel Error: Failed to add events. There is no such trace point. So apparently you cannot trace it the easy way. It seems that this function was inlined by compiler

How do I trace through an XS .so file?

北战南征 提交于 2019-12-04 18:14:17
问题 I have a small Perl program. The program loads a module. The module loads an .so file with XSLoader. This Perl runs on Linux and is built with gcc and -DDEBUGGING , and subsequently so is the .so file. I can recompile. When the Perl program is executed, how do I trace through the C functions in the .so file? I need to know the names of the functions in the order they run. It would be nice to have the function arguments, too. 回答1: Here is an example of using gdb to step into a shared library.

Simple tracing in ASP.NET 4

断了今生、忘了曾经 提交于 2019-12-04 18:08:36
I'd like to use the System.Diagnostics.Trace class to perform simple tracing of my application in a text file. The reason I want to use this and not log4net or any other solution, it is because ... it has to be simple :) So, I got this working in C#: TextWriterTraceListener listener = new TextWriterTraceListener(Server.MapPath("~/App_Data/log.txt")); listener.Filter = new EventTypeFilter(SourceLevels.Warning); Trace.Listeners.Add(listener); Or its equivalent in the Web.config: <system.diagnostics> <sharedListeners> <add name="log" type="System.Diagnostics.TextWriterTraceListener"

aspect c++ tracing function control flow and input output parameters

人走茶凉 提交于 2019-12-04 17:37:31
I am using aspectc++ to generate control flow of the program. trace.ah : #ifndef __trace_ah__ #define __trace_ah__ #include <cstdio> // Control flow tracing example aspect trace { // print the function name before execution starts pointcut virtual methods() = "% ...::%(...)"; advice execution (methods()) : before () { cout << "entering: " << JoinPoint::signature() << endl; // print input parameters** } advice execution(methods()) : after() { // print output parameters** cout << "leaving: " << JoinPoint::signature() << endl; } //prints return values of non void functions advice execution("% ...

Process execution tracing tools

筅森魡賤 提交于 2019-12-04 16:14:56
I am currently in the process of investigating a very peculiar problem on our lab servers. Whenever we run a java program on a machine with a 64-bit SUSE SLES11 installation that has been accessed with Citrix, it just hangs. I have the latest updates on the machine but it doesn't help. If any of these circumstances change, it works: 32-bit OS, SLES10.2, access via Cygwin/Exceed and other X applications such as xclock work fine. This might look like a ServerFault question so far, but what I'm actually looking for is suggestions on software I can use to trace what this software is actually doing

Microsoft JET SQL Query Logging or “How do I debug my customer's program?”

南楼画角 提交于 2019-12-04 14:04:58
The problem: We use a program written by our biggest customer to receive orders, book tranports and do other order-related stuff. We have no other chance but to use the program and the customer is very unsupportive when it comes to problems with their program. We just have to live with the program. Now this program is most of the time extremely slow when using it with two or more user so I tried to look behind the curtain and find the source of the problem. Some points about the program I found out so far: It's written in VB 6.0 It uses a password-protected Access-DB (Access 2000 MDB) that is

System.Diagnostics.Trace not working in web app under ApplicationPoolIdentity

 ̄綄美尐妖づ 提交于 2019-12-04 13:46:00
问题 I have a web application which does (ab)use of System.Diagnostics Tracing. As usual, everything went fine until we hit production this week, where none of our listeners were being hit. Researching a bit, it was clearly a User Account permission issue. Changing from ApplicationPoolIdentity to LocalSystem seemed to do the trick. However, in our production environment changing the User that runs to LocalSystem is a no go. I suspect it has something to do with the security permission needed to

Windows Azure Trace Log not working

眉间皱痕 提交于 2019-12-04 11:02:50
问题 I'm sure I have missed something simple but I can't get simple Trace.WriteLine to work on Azure. Steps I have taken: Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString has been set up to our Azure storage account Import Module Diagnostics to service definition file. Web config : <system.diagnostics> <switches> <add name="logLevel" value="4" /> </switches> <trace autoflush="false" indentsize="4"> <listeners> <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener,