Home > gdb error > gdb error 0377

Gdb Error 0377

your question and get tips & solutions from a community of 418,553 IT Pros process exited with code 0377 & Developers. It's quick & easy. Problem - program exited with gdb cheat sheet code 0377 P: n/a Seo Jae Ick Hi? My name is Seo Jae Ick. I have a problem with running a program on Linux RedHat 8.0. GDB have reported this, program exited with code 0377 I think, this statement comes when 1) explicit call in process exit(-1) <- 0377(octet) = -1(decimal) 2) return -1 in main function (any other case exists?) I have searched exit(-1)in whole codes, but not exists. And I changed main function's return value to another number (like 128) Finally, I added exit handler, ExitHandler by calling atexit(ExitHandler) But, gdb reports same statement(program exited with code 0377) and, breakpoint in ExitHandler skipped. Somebody knows the reason of this problem? Thanks in advance! Seo Jae Ick Nov 14 '05 #1 Post Reply Share this Question 5 Replies P: n/a Mark McIntyre On 14 Feb 2004 20:31:31 -0800, in comp.lang.c , se*******@hotmail.com (Seo Jae Ick) wrote: Hi? My name is Seo Jae Ick.I have a problem with running a program on Linux RedHat 8.0.GDB have reported this,program exited with code 0377I think, this statement comes when1) explicit call in process exit(-1) <- 0377(octet) = -1(decimal)2) return -1 in main function(any other case exists?) your program crashed, and returned garbage to teh OS, which decided to interpret it as meaning -1. Somebody knows the reason of this problem? You have a bug in your program. You need to find the bug, and fix it. Narrow down the location, post a (small) piece of code that causes the crash, and maybe someone here can help fix it. -- Mark McIntyre CLC FAQ CLC readme: ----== Posted via Newsfeed.Com - Unli

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: https://bytes.com/topic/c/answers/216185-problem-program-exited-code-0377-a Sign up How to use GDB to debug a big project? up vote 1 down vote favorite Now I have a c language project which include three directories /bin, /inc and /src. All of header files (.h) are included in /inc and all of source(.c) files are stored in /src, i.e. a.c, b.c, c.c..., the final generated executable file will locate in /bin. http://stackoverflow.com/questions/1715053/how-to-use-gdb-to-debug-a-big-project after compling with makefile, all of obj files will be generated in /src/obj like a.o, b.o, c.o, d....! Moreover an final.exe executable file will be generated in the /bin directory. Now if I want to debug it with GDB, how can I do it??? To debug those obj files in /src/obj? or somewhat else? Many thanks for the kind help! debugging gdb project share|improve this question edited Apr 10 '13 at 4:24 Emrakul 3,78452659 asked Nov 11 '09 at 13:02 MaiTiano 1852620 there is a mistakes in the above question. Actually, all of generated obj files locate in /obj directory which in the same level with /bin, /inc and /src. In other words, there are 4 folders after compling, /bin, /inc, /src and /obj. –MaiTiano Nov 11 '09 at 13:59 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote accepted You can either debug an application by starting it with GDB %> gdb or what is usually easier is to start your application and then attach the debugger to the process using the PID. %> gdb -

you have to exit from one before starting another). In the most general case, you can have multiple threads of execution in each of multiple processes, launched from multiple https://sourceware.org/gdb/onlinedocs/gdb/Inferiors-and-Programs.html executables. gdb represents the state of each program execution with an object called an inferior. An inferior typically corresponds to a process, but is more general and applies also to targets that do not have processes. Inferiors may be created before a process runs, and may be retained after a process exits. Inferiors have unique identifiers that are different from process ids. Usually each gdb error inferior will also have its own distinct address space, although some embedded targets may have several inferiors running in different parts of a single address space. Each inferior may in turn have multiple threads running in it. To find out what inferiors exist at any moment, use infoinferiors: info inferiorsPrint a list of all inferiors currently being managed by gdb. gdb displays for each inferior gdb error 0377 (in this order): the inferior number assigned by gdb the target system's inferior identifier the name of the executable the inferior is running. An asterisk ‘*’ preceding the gdb inferior number indicates the current inferior. For example, (gdb) info inferiors Num Description Executable 2 process 2307 hello * 1 process 3401 goodbye To switch focus between inferiors, use the inferior command: inferior infnoMake inferior number infno the current inferior. The argument infno is the inferior number assigned by gdb, as shown in the first field of the ‘info inferiors’ display. The debugger convenience variable ‘$_inferior’ contains the number of the current inferior. You may find this useful in writing breakpoint conditional expressions, command scripts, and so forth. See Convenience Variables, for general information on convenience variables. You can get multiple executables into a debugging session via the add-inferior and clone-inferior commands. On some systems gdb can add inferiors to the debug session automatically by following calls to fork and exec. To remove inferiors from the debugging session use the remove-inferiors command. add-inferior [ -copies n ] [ -exec executable ]Adds n inferiors to be run using executable as the executable;

 

Related content

gdb error 193

Gdb Error p here for a quick overview of relatedl the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up Cygwin GDB gives error when trying to start program

gdb error attempt to dereference a generic pointer

Gdb Error Attempt To Dereference A Generic Pointer table id toc tbody tr td div id toctitle Contents div ul li a href Gdb Print Void Pointer a li li a href Gdb Dereference Register a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and relatedl policies of this site About Us Learn more about Stack p h id Gdb Print Void Pointer p Overflow the company Business Learn more about hiring developers or posting ads with us gdb

gdb error attempt dereference generic pointer

Gdb Error Attempt Dereference Generic Pointer p here for a quick overview of the site Help Center Detailed answers to relatedl any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up Attempt to dereference a generic

gdb error accessing memory address invalid argument

Gdb Error Accessing Memory Address Invalid Argument p x User account creation filtered due to spam Bug - relatedl g gdb incorrectly maps variables in fortran common block Summary g gdb incorrectly maps variables in fortran common block Status RESOLVED INVALID Alias None Product gcc Classification Unclassified Component debug show other bugs Version Importance P normal Target Milestone --- Assignee Not yet assigned to anyone URL Keywords Depends on Blocks Reported - - UTC by potterveld Modified - - UTC History CC List user show gcc-bugs See Also Host Target alpha-dec-osf d Build Known to work Known to fail Last

gdb error initializing thread_db library

Gdb Error Initializing Thread db Library table id toc tbody tr td div id toctitle Contents div ul li a href Warning dynamic Section For Is Not At The Expected Address wrong Library Or Version Mismatch a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to relatedl any questions you might have Meta Discuss the p h id Warning dynamic Section For Is Not At The Expected Address wrong Library Or Version Mismatch p workings and policies of this site About Us Learn more about Stack solib-absolute-prefix Overflow the

gdb error in sourced command file

Gdb Error In Sourced Command File p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss relatedl the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up gdb stops in a command

gdb error while loading shared libraries libreadline.so.5

Gdb Error While Loading Shared Libraries Libreadline so p SEGGER US Store The link you are trying to reach is no longer available or is invalid Forum Software Burning Board developed by WoltLab GmbH p p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and relatedl policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow

gdb error while loading shared libraries libpython2.6.so.1.0

Gdb Error While Loading Shared Libraries Libpython so p here for a quick relatedl overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up libpython so cannot

gdb error detected on stdin

Gdb Error Detected On Stdin p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more relatedl about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up gdb pipe redirection Error gdb Hangup

gdb error creating process 193

Gdb Error Creating Process p here for a quick overview of the site relatedl Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up gdb fails with error when debugging MinGW-compiled

gdb error while loading shared libraries libexpat.so.0

Gdb Error While Loading Shared Libraries Libexpat so p Comments Here again another post about CentOS Today relatedl morning while I was trying to start gdb with default compiler gcc which comes with CentOS - it crashed with following descriptive error gdb error while loading shared libraries libexpat so cannot open shared object file No such file or directory After a min search I found expat rpm for Cent OS from I downloaded and try to install it with rpm -ivh command but it failed because of expact-devel dependancy Then I used command yum install expat- - el i rpm

gdb error while loading shared libraries libexpat.so.1

Gdb Error While Loading Shared Libraries Libexpat so p Search HCL Search Reviews Search ISOs Go to Page LinuxQuestions org Forums Linux Forums Linux - General error while loading shared libraries libexpat so cannot open shared object file User Name relatedl Remember Me Password Linux - General This Linux forum is for general Linux questions and discussion If it is Linux Related and doesn't seem to fit in any other forum then this is the place Notices Welcome to LinuxQuestions org a friendly and active Linux Community You are currently viewing LQ as a guest By joining our community you

gdb error while loading shared libraries libncurses.so.5

Gdb Error While Loading Shared Libraries Libncurses so p communities company blog Stack Exchange Inbox Reputation and Badges relatedl sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question Ask Ubuntu is a question and answer site for Ubuntu users and developers Join them it only

gdb error codes

Gdb Error Codes table id toc tbody tr td div id toctitle Contents div ul li a href Gdb Reload Executable a li li a href Gdb Restart Program a li li a href Gdb Tutorial a li ul td tr tbody table p option g -g -o gdbprog gdbprog cc Load executable into gdb gdb gdbprog GDB is free software and you are welcome to distribute copies of relatedl it under certain conditions type show copying to see the gdb where command conditions There is absolutely no warranty for GDB type show warranty for details GDB p h id

gdb error 5

Gdb Error p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this relatedl site About Us Learn more about Stack Overflow the company Business gdb error creating process error Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation starting debugger failed code blocks Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign