David: Look at the assembly code for a little "Hello World" program and copy that code into your assembly code to call printf from assembly.
James K Beard -----Original Message----- From: David Cleaver [mailto:[email protected]] Sent: Monday, March 15, 2010 12:35 AM To: mingw64 Subject: [Mingw-w64-public] Need help debugging... Hello all, This may be the wrong list to ask this, but I'm not sure where else to ask. I'm working on a project that I can compile just fine, but when I run the program it crashes silently. This isn't my project, it is a project that I've come across and would like to help out on. This project compiles and runs fine on other platforms, so I'm guessing there must be something in one of the project files that either Mingw64 or Win64 doesn't like. I usually track down bugs like this by putting in printf's and then seeing how far it gets into the code. However, I've narrowed the problem down to an asm file and I'm not sure how to put print statements into an assembly file. The file is named redc.asm. I just tried debugging with gdb and it gave the following output: Program received signal SIGSEGV, Segmentation fault. UnrollLoop () at redc.s:105 in redc.s (gdb) warning: Can not parse XML library list; XML support was disabled at compile time 105 redc.s: No such file or directory. c Continuing. Program received signal SIGSEGV, Segmentation fault. UnrollLoop () at redc.s:105 105 in redc.s (gdb) c Continuing. Program exited with code 0200. (gdb) c (gdb) The program is not being run. That error message doesn't look too helpful. I think if I can put print statements into that assembly file, I can track down which asm line is causing the crash. Does anyone here know how to put print statements into assembly? I just need something simple. Even printing out a single character and newline would be helpful. If this is the wrong list to ask this, could someone suggest another place to ask? Thanks for your time. -David C. ---------------------------------------------------------------------------- -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
