查看嵌入式命令行调用 [英] Viewing Embeded Command Line Calls

查看:142
本文介绍了查看嵌入式命令行调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我一直在使用带有arm工具链的基于Windows的IDE,但最近已迁移到linux.我有几个大型项目,由于它们向左和向右抛出错误,因此我无法为其创建适当的makefile.

我希望继续使用相同的arm编译器,因为arm和gnu asmbler语法不同,并且我的某些文件在asm中.

他们可以通过一种方法来运行一个应用程序来监视程序执行的所有操作,以便可以在IDE中加载项目,进行重建并知道对asm,gcc和链接器的整个调用顺序吗?

我可以通过Windows或Linux搭配Wine来做到这一点,这更容易了.我尝试执行systrace,但是,哇,多数民众赞成在大量输出和带有全线程视图的"ps"的情况下无法提供足够的信息.

谢谢!

Hello,

I have been using a windows based IDE with an arm toolchain but have recently migrated to linux. I have several large projects that I can not make a proper makefile for as they throw errors left right and center.

I wish to continue using the same arm compiler because arm and gnu asmbler syntax are different and some of my file are in asm.

Is their a way I can run an app that will monitor everything a program does so I can load my project in the IDE, hit rebuild and know the entire call sequence to the asm, gcc and linker?

I can do this via windows or linux with wine which ever is easier. I tried doing systrace but oh wow thats way to much output and ''ps'' with a full thread view does not give enough information.

Thanks!

推荐答案

特雷弗,

我不知道您的程序运行了多长时间,但是Sysinternals的进程浏览器"可以让您了解程序是如何启动的,包括整个命令行.我认为它是在可以通过进程列表中的上下文菜单打开的进程的属性对话框中.
在属性对话框中,浏览那里的选项卡并环顾四周.我认为它是在图像选项卡上可以看到整个命令行的地方.因此,如果您知道可执行文件的名称是在做编译工作,则应该全部尝试一下.
我看到的唯一问题是程序即将完成,您有机会找到该过程并进行查看.

祝你好运!

修改
在Windows XP Professional上,有一个命令行工具可以执行WMI: http://windowsxp.mvps.org/listproc.htm [< ^ ].
在上面的网站上,他们这样做是这样的:
Hi Trevor,

I don''t know for how long your program runs, but "process explorer" from Sysinternals lets you look at how a program was started including the whole command line. I think it is in the property dialog of a process that can be opened via context menu from the list of processes.
In the property dialog go through the tabs that are there and look around. I think it is on the image tab where the whole command line can be seen. So if you know what the name of the executable is that''s doing your compilation stuff you should be all set to go and try that out.
Only problem I see is the program finishing to soon for you to have a chance to find the process and have a look at it.

Good luck!

Modification
On windows XP Professional there is a command line tool to do WMI: http://windowsxp.mvps.org/listproc.htm[^].
On the site above they do it like this:
WMIC /OUTPUT:C:\ProcessList.txt PROCESS get Caption,Commandline,Processid


修改结束
最好的问候,

Manfred


End of modification
Best regards,

Manfred


我的项目树有几个文件夹,并输出obj,lst,lib,以将目录从大约40个文件中分离出来.

您建议使用什么程序为大型项目创建makefile框架?我可以制作基本的makefile,但是它们的很多依赖项和输出文件夹中的%:.:和.c.o:可能会造成混淆.

我还运行了"strace wine ide.exe 2& gt; dump.txt",然后运行了"cat dump.txt | grep armgcc'',我只找到对文件位置的引用.在IDE中,我编译了一个c文件,当我对该文件进行grep时,我看到:


stat64("/home/uminded/.wine/dosdevices/c:/Keil/ARM/Examples/Blinky/Blinky.c",{st_mode = S_IFREG | 0644,st_size = 1755,...})= 0
write(19,正在编译Blinky.c ... \ r \ n",23)= 23
写(19,"Blinky.c-0错误,0警告" ...,38)= 38

但是我找不到传递给armgcc.exe来编译Blinky.c的字符串

最终目标是使项目IDE成为Code :: Blocks,但使用arm编译器
My project tree has several folders and outputs obj, lst, lib to seperate directories from around ~40 files.

What programs would you recommended to create a makefile skeleton for a large project? I can make basic makefiles but then theirs a lot of dependencies and output folders the %:.: and .c.o: can get confusing.

Also I ran ''strace wine ide.exe 2&gt;dump.txt'' and then ''cat dump.txt | grep armgcc'' and I only found references to the files locations. In the IDE i compiled one c file and when I grep for that file I see:


stat64("/home/uminded/.wine/dosdevices/c:/Keil/ARM/Examples/Blinky/Blinky.c", {st_mode=S_IFREG|0644, st_size=1755, ...}) = 0
write(19, "compiling Blinky.c...\r\n", 23) = 23
write(19, "Blinky.c - 0 Error(s), 0 Warning"..., 38) = 38

But I can not find the string that was passed to armgcc.exe to compile Blinky.c

The end goal is to get the project IDE as Code::Blocks but use the arm compiler


某些工具可能会有所帮助:

位于 http://www.cmake.org/ [ ^ ]

ACE MPC的Som信息在这里: http://www.ociweb.com/products/MPC [ http://download.dre.vanderbilt.edu/ [ ^ ]

Gnu自动工具-这里的一些信息 http://www.lrde.epita.fr/~adl/autotools.html [^ ]

希望这会有所帮助
Espen Harlinn
Some tools that might help:

Cmake at http://www.cmake.org/[^]

ACE MPC som info here:http://www.ociweb.com/products/MPC[^] and download as part of ACE+TAO here http://download.dre.vanderbilt.edu/[^]

Gnu autotools - some info here http://www.lrde.epita.fr/~adl/autotools.html[^]

Hope this helps
Espen Harlinn


这篇关于查看嵌入式命令行调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆