473,804 Members | 2,123 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

line numbers on segfault

Situation:
Running a MPI program that segfaults.
Cannot open program up in debugger due to nature of MPI system.
Using g++ 3.2.3.

Goal:
Find out which line it segfaults on; ideally which variable name causes
the error. Some kind of error message akin to VC7's "stack corrupted
around varname" message would be very nice.

Less ideally:
I'm told that core dumps aid in finding out what went wrong where.

a)Is a "stack corrupted around" message possible with gcc?
b)How can I force my program to core dump on exceptional exit?
Thanks,
Paul
Jul 22 '05 #1
3 1667
"Paul" <un******@rmci. net> wrote...
Situation:
Running a MPI program that segfaults.
Cannot open program up in debugger due to nature of MPI system.
Using g++ 3.2.3.

Goal:
Find out which line it segfaults on; ideally which variable name causes
the error. Some kind of error message akin to VC7's "stack corrupted
around varname" message would be very nice.

Less ideally:
I'm told that core dumps aid in finding out what went wrong where.

a)Is a "stack corrupted around" message possible with gcc?
b)How can I force my program to core dump on exceptional exit?


The only relevant term I've found is "variable". MPI, segfault, core
dump, debugger, while are well known, unfortunately mean very little
in a language newsgroup. Unless your problem is proven of a language
kind, you'll be better off in a newsgroup dedicated to your platform
or to your compiler. Since you didn't say what platform it was, I
can't recommend anything in particular, only 'comp.os.<your_ platform>',
but for g++ there is 'gnu.g++.help'.

If you think your problem _is_ of a language kind, please post the code
you think is responsible. Without code there is no real way to help
you.

Victor
Jul 22 '05 #2
Paul wrote:
Situation:
Running a MPI program that segfaults.
Cannot open program up in debugger due to nature of MPI system.
I used Google

http://www.google.com/

to search for

+"Parallel DeBugger" +"MPI"

and I found lots of stuff.
We use TotalView

http://www.etnus.com/

You can download it and try it for free.
Using g++ 3.2.3.

Goal:
Find out which line it segfaults on; ideally which variable name causes
the error. Some kind of error message akin to VC7's "stack corrupted
around varname" message would be very nice.

Less ideally:
I'm told that core dumps aid in finding out what went wrong where.

a)Is a "stack corrupted around" message possible with gcc?
b)How can I force my program to core dump on exceptional exit?


If you can run on one node (the head node),
you might be able to use The GNU Debugger (gdb).

If you are intimately familiar with the source code (if you wrote it),
you can seed the source with printf statements
to help you locate the segfault.
You can quickly locate it using a binary search.
It can be a lot quicker than the debugger
unless you didn't write and don't understand the code very well.
Jul 22 '05 #3
[snips]
We use TotalView

http://www.etnus.com/

You can download it and try it for free.

It can be a lot quicker than the debugger
unless you didn't write and don't understand the code very well.


[/snips]

Thank you.

I appreciate the helpful reply.

-Paul
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
14509
by: drew | last post by:
I am reading my textbook and doing the code examples in MS Visual C++ 6.0 for my next class beginning Jan 05. The textbook examples show line numbers. How do I get line numbers to show as I type in the examples? tia drew
14
7145
by: Vlad | last post by:
Please consider this code public class MyClass{ public bool MyMethod1(){ return false; } public bool MyMethod2(){ int x=0,y=1/x; return false; }
8
7834
by: Arun Bhalla | last post by:
Hi, I'm developing an Explorer bar using VS.NET 2003 (C#) on Windows XP. For some time, I've noticed that I don't have filenames and line numbers appearing in my exceptions' stack traces. On the other hand, debugging with breakpoints, etc. seems to work fine in VS.NET 2003. I can't understand why this isn't working -- and I think it used to work, perhaps under VS.NET 2002, but maybe not. The information doesn't appear in exceptions...
0
1444
by: Navin | last post by:
Hi, I am making a code editor in C# and want to display line numbers to the left. I have a UserControl with a ListView docked to the left edge and a TextBox that makes up the rest. I am able to add items to the ListView when a new line is entered in the TextBox (these items are the line numbers). What I am not able to figure out is how to update the view of the ListView when the TextBox starts scrolling vertically. I would like the...
2
3489
by: pavel.orehov | last post by:
Hi, I am using Environment.StackTrace to print the stack trace to the log when I have any exceptions in my application. When I work in development environment I see the line numbers in the trace without any problems. However when an application runs at the production PC deployed with VS2005 setup I don't see line numbers in the stack trace.
1
3307
by: carlg | last post by:
There seem to be plenty of Javascript implemented WYSIWYG editors for editing rich text in a web browser, but I haven't been able to find one that shows line numbers. Even if that was the only enhancement over the standard textarea object it would be great for my needs. Does anyone know of such a widget? Thanks, -Carl Gundel, author of Liberty BASIC
3
1771
by: Rahul | last post by:
Hi, Is there a way to get the line numbers to display in the exception when you have published your web site? Thanks Rahul
7
3944
by: Greg | last post by:
Visual Studio - Line numbers missing from error list I'm writing an app in ASP.NET using VS 2005. There are no line numbers with the build errors reported. Any suggestions? I can't find any reports of anyone else having the same problem. Is there a setting I may have missed? Greg.
5
1887
by: Ramdas | last post by:
I am doing some HTML scrapping for a side project. I need a method using sgmllib or HTMLParser to parse an HTML file and get line nos of all the tags I tried a few things, but I am just not able to work with either if the parsers.
1
2743
by: pavanip | last post by:
Hi, I am developing one windows application in that i am trying to integrate microsoft word programatically. I used web browser control to enter text,saving it as a word document but the saved document is not showing page numbers,line numbers etc like normal word document. I want to display page numbers and line numbers to my word using web browser control.Can you please tell me is it the correct way to implement word in c# and can you...
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10600
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10352
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9175
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6867
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5535
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.