GVKun编程网logo

当Cygwin的Perl用反引号启动程序时,不能触发系统debugging器转储核心

8

在本文中,我们将给您介绍关于当Cygwin的Perl用反引号启动程序时,不能触发系统debugging器转储核心的详细内容,此外,我们还将为您提供关于c–CygwinGDB在尝试启动程序时给出错误19

在本文中,我们将给您介绍关于当Cygwin的Perl用反引号启动程序时,不能触发系统debugging器转储核心的详细内容,此外,我们还将为您提供关于c – Cygwin GDB在尝试启动程序时给出错误193、Debugging Perl、debugging – 如何调试无法启动的erlang应用程序、debugging – 是否有Windowsdebugging器的检查点function?的知识。

本文目录一览:

当Cygwin的Perl用反引号启动程序时,不能触发系统debugging器转储核心

当Cygwin的Perl用反引号启动程序时,不能触发系统debugging器转储核心

我有使用反引号启动任意进程的脚本。 有时会发生崩溃(例如零分),并且在发生这种情况时需要获得核心转储以进行分析。

我已经注册了一个perl脚本作为与操作系统的崩溃处理程序(这在Windows 7中 – 我知道你想知道),它与崩溃的PID调用; 处理程序附加微软的'cdb'debugging器,它创build所需的转储。 我的testing“crasher”程序是一个C ++可执行文件,除以零(Crasher.exe)。

问题:当我使用Cygwin的Perl实现时,程序崩溃从不触发崩溃处理程序。 我的怀疑是,Perl正在解决这个问题,然后悄无声息地抛弃它。 所有工作正常与来自ActiveState的Perl。

问题:我怎样才能让Cygwin的Perl离开,让错误一直传播回系统。

用Cygwin编译android-opencv库

让gcloud在Cygwin Windows中工作

寻找一种有效的方法来检查文件存在与Windows上的文件在SAN上

无法与cygwin运行pexect

线程之间的数值差异(cygwin上的openMP)

下面是一个使用ActiveState perl触发崩溃处理程序并生成核心转储的示例

C:> toolsPerlbinperl.exe -e "`Crasher.exe`;"

但是使用Cygwin不会

C:> cygwinbinperl.exe -e "`Crasher.exe`;"

另外,如果我直接在Cygwin的shell中启动Crasher.exe,则不会调用崩溃处理程序; 如果通过Cygwin或ActiveState Perl中的反引号启动,它也不会被调用。

apt-get在Cygwin中不起作用

在Haskell中,如何在Windows上安装编码包?

麻烦在mahout安装grouplens数据

我如何手动安装旧的cygwin软件包?

帮助在Windows上使用g ++进行构build

让我举出汉斯·帕斯坦 :

基本的问题是SAP调用SetUnhandledExceptionFilter()。 做自己的事情,所有的大型项目都这样做。 在操作系统中没有内置的老板倍率开关来阻止它这样做。

所以不,你不能为Cygwin做。 您可以在调试器下运行它并捕获第一次机会异常。 根据抛出的异常数量,您可能会找到有趣的一个。

c – Cygwin GDB在尝试启动程序时给出错误193

c – Cygwin GDB在尝试启动程序时给出错误193

当我尝试在cygwin上使用gdb调试一个简单的程序时,我得到以下内容:

C:\Users\Benoit St-Pierre\workspace_cpp\cs454>gdb a.exe
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
copyright (C) 2008 Free Software Foundation,Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY,to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) start
Breakpoint 1 at 0x401a51: file server.cc,line 207.
Starting program: /cygdrive/c/Users/Benoit St-Pierre/workspace_cpp/cs454/a.exe
Error creating process /cygdrive/c/Users/Benoit St-Pierre/workspace_cpp/cs454/a.exe,(error 193).

错误193是ERROR_BAD_EXE_FORMAT.

编译的应用程序本身运行良好,客户端连接并与应用程序交互.我正在使用cygwin 1.7因为我正在使用新的getaddrinfo方法来设置套接字.使用gcc 3.4.4使用以下命令编译应用程序:

g++ -g3 server.cc

任何人都知道我可能做错了什么?

解决方法

问题是您的路径名中有空格字符.将文件移动到另一个目录,gdb将能够启动该过程.

Debugging Perl

Debugging Perl

 How to Debug Perl Library and Scripts?

 

1. Changing @INC - where Perl loads its modules (http://www.wellho.net/mouth/588_Changing-INC-where-Perl-loads-its-modules.html) 

The @INC array is a list of directories Perl searches when attempting to load modules. 

Where does Perl load modules from in its use and require statements? It loads them from directorys in a special list called @INC,from files with a .pm extension in those directorys. 
 
When Perl's installed,@INC is set to a list of directorys that includes generic locations for its standard modules,some release specific directories,and "." the current directory,which are checked in order each time you do a 
 or 
 
Some ways to modify @INC 

  • ** You can add to the list in @INC by using the -I command line option:

perl -I /Users/grahamellis/jan06 i2 
says "run the perl program i2,additionally checking the jan06 directory for modules" 

  • ** You can add to the list within your program by doing so in a BEGIN block prior to the  statements:

BEGIN { 
push @INC,"/Users/grahamellis/jan06"; 

use demo; 
print "hello world"; 

Rather curIoUsly,  calls are run at compile time not at run time ... but then so are BEGIN blocks ... so you put your manipulation of @INC into one of those to get it to happen early enough. 

  • ** You can add to the beginning of the list by setting the PERL5LIB environment variable prior to running your program:

export PERL5LIB=/Users/grahamellis/jan06 

and you can use a colon separated list for that if you want to pre-pend more than one directory.

  • **There is also the "use lib" pragma - this is probably the most common approach. And $PERL5LIB can also be called just $PERLLIB.

2. Debugging Perl http://ralphie.perlmonk.org/mosix/debug.html

To check the Syntax of your scripts,type "perl -c scriptname.pl " . It is also worthwhile to add the -w switch ("perl -cw ..."),to turn on warning mode. If you were wise enough to "use strict" in the body of the code,the Syntax check will also specify inappropriate scalar scoping,which goes a little beyond the normal syntactical problems that are identified. Once your script will pass through the Syntax check with a "Syntax ok" message,you will have a legal perl script from the standpoint that all of the statements are legal perl statements. That doesn't mean that the manner in which any given statement is expressed will return the result that you are looking for,that the functions that are used in the code are the right ones for the job,or that the overall structure of the script does anything like what you think it supposed to do. It just means that all of the perl i's are dotted and t's are crossed. (On the other hand,this is not such a minor thing,either.)

3. perldebug (http://perldoc.perl.org/perldebug.html)

Calling the debugger

There are several ways to call the debugger:

  • perl -d program_name

On the given program identified by program_name .

  • perl -d -e 0

Interactively supply an arbitrary expression using -e .

  • perl -d:Ptkdb program_name

Debug a given program via the Devel::Ptkdb GUI.

  • perl -dt threaded_program_name

Debug a given program using threads (experimental).

4. Summary of Subprocess Operations

Table 14.1: Summary of Subprocess Operations

Operation

Standard Input

Standard Output

Standard Error

Waited for?

system()

Inherited from program

Inherited from program

Inherited from program

Yes

Backquoted string

Inherited from program

Captured as string value

Inherited from program

Yes

open() command as filehandle for output

Connected to filehandle

Inherited from program

Inherited from program

Only at time of close()

open() command as filehandle for input

Inherited from program

Connected to filehandle

Inherited from program

Only at time of close()

fork, exec, wait, waitpid

User selected

User selected

User selected

User selected

 

Above table is from the book Learning Perl.

debugging – 如何调试无法启动的erlang应用程序

debugging – 如何调试无法启动的erlang应用程序

如果我编写一些erlang代码来构建监督树,然后在启动时使用以下命令启动应用程序,则可能很难找出它为什么不起作用:

erl -s myapp -pa ebin ... ...

(myapp示例模块)

-module(myapp).
-export([start/0]).
start() -> application:start(myapp).

假设我的应用程序启动了一个主管myapp_sup. myapp_sup轮流启动了几个主管(比如说server_sup,database_sup,another_sup).

Theese监督员将推出一些gen_servers.

在某些时候,如果我的代码中有错误,我找不到它!

我写了一些调用somemodule:functionthatdoesntexists()在一些gen_server的init回调中.

所有vm说的是“init终止在do boot中”,然后显示badmatch的错误位置,精确到顶层模块(myapp)的文件和行.

(Badmatch因为ok = application:start(…)将不匹配).

我查看了erl_crash.dump文件,并且没有关于这个未定义函数的信息(但我在原子列表中找到它).

所以,我写了一些日志来近似地看到错误在哪里,但是我将不得不用手启动我的gen_servers以获取正确的错误信息.

我错过了什么,我怎么能更快地搞清楚?

谢谢

解决方法

如果您的应用程序调用未知模块,则您的erl_crash.dump文件将包含如下所示的行:

41DABB8:t4:A8:nonexistent_module,A7:unkNown,N,N

行中的“未知”表示无法找到模块nonexistent_module.在这些情况下,在erl_crash.dump文件中搜索字符串“unkNown”可能会有所帮助.

如果您怀疑某个模块调用了一个不存在的函数,您可以在交互式erl shell中使用the xref tool找到它.确保使用调试信息(通常通过erlc debug_info)编译模块,然后:

1> xref:m(my_module).
[{deprecated,[]},{undefined,[{{my_module,init,1},{another_module,unkNown,0}}]},{unused,[]}]

这里,外部参照向我们展示了my_module:init / 1函数调用another_module:unkNown / 0函数,但未知/ 0函数未在another_module中定义.

您还可以使用外部参照来检查整个应用程序;详见the documentation

debugging – 是否有Windowsdebugging器的检查点function?

debugging – 是否有Windowsdebugging器的检查点function?

有一个窗口(win32,.net)debugging器可以做一些像gdb检查点?

http://sourceware.org/gdb/current/onlinedocs/gdb/Checkpoint_002fRestart.html

在我的新窗口安装Image.FromStream不以相同的方式工作

什么是控件的“On_Load”等效表单?

当窗体位于主监视器的上方和左方时,光标变为对angular线resize

.Net Windows服务和FileSystemWatcher问题

获取当前在Windows任务栏中可见的应用程序(或窗口)列表

我在Windows上听到的最接近的功能是IntelliTrace 。 另一个文档在这里: http : //msdn.microsoft.com/en-us/library/dd264915%28VS.100%29.aspx

该功能有很多限制 – 没有64位本地代码,脚本或sql CLR支持

今天关于当Cygwin的Perl用反引号启动程序时,不能触发系统debugging器转储核心的介绍到此结束,谢谢您的阅读,有关c – Cygwin GDB在尝试启动程序时给出错误193、Debugging Perl、debugging – 如何调试无法启动的erlang应用程序、debugging – 是否有Windowsdebugging器的检查点function?等更多相关知识的信息可以在本站进行查询。

本文标签: