Sponsored Content
Top Forums Programming Using gdb, ignore beginning segmentation fault until reproduce environment segmentation fault Post 302714793 by pooyair on Friday 12th of October 2012 04:58:01 PM
Old 10-12-2012
Thanks for replies

1. As explained in first post of thread , using normal gdb backtrace comand could not helpful , since i know Segmentation fault log , my question is not how i could catch the segmentation fault error log or fix it , since i know how.
my question is , If segmentation fault error occur more than 12 times , my environment (or maybe my kernel would crash) it could be kernel bug with my stb , Therefore , using -g and catch the first SEGV is not my desire (i know even the fix for this SEGV) but i deliberately , let it to be , in order to investigate Kernel (or environment) crash

if i use -g option and use gdb , before i could achieve to investigate Kernel (or environment) crash , i would get Segmentation fault (which is not as my desire , since it prevent me to know , why kernel would crash...


2. i compiled polo , with the cc option : -ggdb
could somebody please tell me what is the difference beetween -g and -ggdb in cc option?
 

10 More Discussions You Might Find Interesting

1. Programming

Hi! segmentation fault

I have written a program which takes a directory as command line arguments and displays all the dir and files in it. I don't know why I have a problem with the /etc directory.It displays all the directories and files untill it reaches a sub directory called peers which is in /etc/ppp/peers.the... (4 Replies)
Discussion started by: vijlak
4 Replies

2. AIX

Segmentation fault

Hi , During execution a backup binary i get following error "Program error 11 (Segmentation fault), saving core file in '/usr/datatools" Riyaz (2 Replies)
Discussion started by: rshaikh
2 Replies

3. Linux

Segmentation fault

Hi, on a linux Red HAT(with Oracle DB 9.2.0.7) I have following error : RMAN> delete obsolete; RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 2 using channel ORA_DISK_1 Segmentation fault What does it mean ? And the solution ? Many thanks. (0 Replies)
Discussion started by: big123456
0 Replies

4. Programming

segmentation fault

What is segmentation fault(core dumped) (1 Reply)
Discussion started by: gokult
1 Replies

5. Programming

Segmentation fault.

I'm getting a segmentation fault. I'm new to Linux programming. Thanks so much for all of your input.:eek: #include </usr/include/mysql++/mysql++.h> #include <stdio.h> #include <iostream> #include <sstream> #include <string.h> using namespace std; int outputToImport(const char*... (1 Reply)
Discussion started by: sepoto
1 Replies

6. Programming

segmentation fault.

This code is causing a segmentation fault and I can't figure out why. I'm new to UNIX and I need to learn how to avoid this segmentation fault thing. Thank you so much. Thanks also for the great answers to my last post.:):b: int main() { mysqlpp::Connection conn(false); if... (3 Replies)
Discussion started by: sepoto
3 Replies

7. Programming

Segmentation fault gdb

Hello everyone, I am using the debugger from C++ and these are the message I got: Program received signal SIGSEGV, Segmentation fault. 0x0040cc0e in malloc_consolidate (av=0x4ff3c0) at malloc.c:5169 in malloc.c I don't know if the problem is cause i'm trying to acess an invalid memory... (1 Reply)
Discussion started by: juliecf5
1 Replies

8. Homework & Coursework Questions

Segmentation Fault

this is a network programming code to run a rock paper scissors in a client and server. I completed it and it was working without any error. After I added the findWinner function to the server code it starts giving me segmentation fault. -the segmentation fault is fixed Current problem -Also... (3 Replies)
Discussion started by: femchi
3 Replies

9. UNIX for Dummies Questions & Answers

Using gdb to detect segmentation fault in sh?

I am using scientific linux. In the directory user/project/Build, after I ran 'make' to compile and link all the cpp files,I had no problems. But then, when I went to directory user/run/run.sh, which runs the project binary in user/project/Build/bin/project, I get a segmentation fault error. In... (1 Reply)
Discussion started by: larry burns
1 Replies

10. Programming

C. To segmentation fault or not to segmentation fault, that is the question.

Oddities with gcc, 2.95.3 for the AMIGA and 4.2.1 for MY current OSX 10.14.1... I am creating a basic calculator for the AMIGA ADE *NIX emulator in C as it does not have one. Below are two very condensed snippets of which I have added the results inside the each code section. IMPORTANT!... (11 Replies)
Discussion started by: wisecracker
11 Replies
xpc_abort(3)						   BSD Library Functions Manual 					      xpc_abort(3)

NAME
xpc_abort -- conditions which cause XPC to abort DESCRIPTION
The XPC API will aggressively defend itself against perceived misuse. Wherever XPC can definitively detect misuse of its APIs or data corrup- tion, it will abort. For example, if the retain count of an object underflows by calling xpc_release(3) on it too many times, XPC will abort the process. Many frameworks opt to keep the program limping along in such a state (and will perhaps print a warning message to the system log), but aborting upon detection provides unmistakable warning that there is a bug present in the application which should be fixed before shipping. When XPC aborts a process, it will place information about the condition which triggered the abort in the Application Specific Information section of the crash report. The message will be human-readable, prefixed with "XPC API Misuse:", and the crash report will indicate the stack trace which caused the abort. XPC will also abort if it detects unrecoverable data corruption in its internal state. The messages for these conditions will be prefixd with "Bug in libxpc:". If you come across such a crash, please file a bug and include the generated crash log, system log and steps to reproduce (if there are any identifiable steps). Currently, the manner in which XPC aborts the process will result in termination due to SIGILL (illegal instruction). The exact signal raised may change from release to release (or platform to platform). But on OS X Lion, SIGILL may be used as a hint that the process was terminated intentionally. DEBUGGING
When debugging in Xcode or at the gdb command prompt, the debugger acts as the exception handler for the process being debugged. As a result, if the process is aborted by XPC, no crash report will be generated, and thus it may not be obvious why the program was terminated. As mentioned before, SIGILL is an indication that the process was terminated intentionally. If you observe the last frame in the crashing stack to be _xpc_api_misuse(), you may use the xpc_debugger_api_misuse_info() API from within the debugger to obtain a human-readable string describing why the process was aborted. For example: Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/operand. 0x000000010012b25e in _xpc_api_misuse () (gdb) p (char *)xpc_debugger_api_misuse_info() $1 = 0x7fff5fbff908 "XPC API Misuse: Over-release of object." (gdb) This message indicates that xpc_release(3) was called too many times on an object. IMPORTANT: The xpc_debugger_api_misuse_info() API can ONLY be called from within a debugger. It is not meant to be called directly from the program. Do not call it directly from your code, and do not rely on the address of the result for any reason. SEE ALSO
xpc(3), xpc_object(3), xpc_objects(3) Darwin 1 July, 2011 Darwin
All times are GMT -4. The time now is 05:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy