Sponsored Content
Full Discussion: c++ debugging
Top Forums Programming c++ debugging Post 302635905 by gotenxds on Sunday 6th of May 2012 03:31:46 PM
Old 05-06-2012
c++ debugging

hey
i have a problem with a switch case in program and the debugger is messy has hell ( we use normal VI and gdb in our schoool to make it more diffiacult)

any way i have a problom where for some unknown reason the debugger just skips a switch statment as if it wasent even there

the rest of the code works fine

but for some reason that switch statment is just ignored

it uses enums
Code:
enum name
{
    X,
    Y,
};

name Name;

name = a function that returns that enum;

switch (name)
{
    case (X):
    {
    }
    case (Y):
    {
    }
     default:
     {
     }

}

its all fine and i can see in the debugger that the name has a valid value

i know a lot of things can cause this but any help would be greatly appreciated

i will allso ask, can a memory leak or goingover the border of an array caouse this ?

Moderator's Comments:
Mod Comment Code tags for code please

Last edited by Corona688; 05-07-2012 at 03:08 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Regarding Debugging

Hi, If we want to debug a shell script, then set -vx has to be included in the begining of the script. Just i want to know what purpose -vx is used. Thanks in advace Sarwan (2 Replies)
Discussion started by: sarwan
2 Replies

2. Solaris

debugging problem

OS : SOLARIS 10 debug tool :$gdb -v GNU gdb 6.6 compiler : $gcc -v gcc version 2.95.3 20010315 (release) When i tried to debug my application i got the following error. $gdb Pal GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. This GDB was... (2 Replies)
Discussion started by: satish@123
2 Replies

3. Solaris

debugging

when I tried to debug my application i got the following. gdb -v GNU gdb 6.6 file is in C and Xmotiff Languages (gdb) attach 25499 Attaching to process 25499 Retry #1: Retry #2: Retry #3: Retry #4: 0xfea40b68 in ?? () (gdb) where #0 0xfea40b68 in ?? () (0 Replies)
Discussion started by: satish@123
0 Replies

4. Programming

Need some help in debugging the C-Progam.

Hi i want to debug the C program with GDB debugger. I want to debug the program by line by line. I want to debug program like as we debug the program in Turbo-C using the F8. Can any one help me? I know i have to use single stepping. But i don't know how to use it. Any help can be appreciated..... (5 Replies)
Discussion started by: ps_sach
5 Replies

5. Shell Programming and Scripting

script debugging

is there any way you can add a breakpoint in a script so you can stop on it? i have used -xv in my shebang but the script just runs and i want it to stop at a specific point in the script. appreciate any help. (1 Reply)
Discussion started by: npatwardhan
1 Replies

6. Shell Programming and Scripting

Fixer Debugging

hi all, would you please help me correcting and debugging this script: fx-permiss.sh which accepts a list of users as argument resiting those files permissions: say our directory structure: /home/erzal/file /home/erzal/dire /home/erzal/share /home/erzal/share/file /home/erzal/share/dire 1-... (1 Reply)
Discussion started by: erzal
1 Replies

7. Homework & Coursework Questions

Fixer Debugging

School:Syrian Virtual University - Bachelor in Information Technology - Tutor: A.Issa - course: S10-iti320 hi all, would you please help me correcting and debugging this script: fx-permiss.sh which accepts a list of users as argument resiting those files permissions: say our directory... (0 Replies)
Discussion started by: erzal
0 Replies

8. UNIX for Dummies Questions & Answers

blcr debugging

hey, can any one please tell me how can i debug blcr?? actually i have checkpointd a client using blcr and i want to check out what actually happens when we checkpoint any program. so i want to see what happen when we type $cr_checkpoint pid i mean i want to debug when i enter this... (0 Replies)
Discussion started by: pratibha
0 Replies

9. Shell Programming and Scripting

Debugging functions

So here I have a simple function that I wish to debug. However, I am unable to debug the desired function even with set -o functrace enabled. Before resorting to asking this question, I had managed to find a possible solution that did not produce the desired results, which is located here. How... (5 Replies)
Discussion started by: BrandonD
5 Replies

10. Homework & Coursework Questions

Debugging Help Needed

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! I am VERY much a neophyte with shell scripting. I am working on the following, 1. The problem statement, all variables and given/known data: "Create a script sends an... (7 Replies)
Discussion started by: doghouse308
7 Replies
IPKDB(4)						   BSD Kernel Interfaces Manual 						  IPKDB(4)

NAME
ipkdb -- IP-based kernel debugger SYNOPSIS
options IPKDB options IPKDBSECURE options IPKDBKEY=""IPKDB key for remote debugging"" options IPKDB_NE_PCISLOT=x DESCRIPTION
ipkdb is a kernel debugger that uses UDP and IP to communicate with a remote debugger (normally gdb(1)). Since the debugger uses its own driver to talk to the networking hardware, the number of supported network interfaces is a lot less than what is supported by the kernel. At the time of this writing, there is only support for a NE2000 compatible card in a PCI slot. In order for ipkdb to find your card, you need to specify the slot the card is in via the options IPKDB_NE_PCISLOT. To use ipkdb, you have to set up a DHCP server, from which ipkdb can get the IP address for the interface that is used for debugging. To enter ipkdb, the remote debugger has to send the protocol start packet. E.g., gdb will do this on the command target ipkdb debuggee IPKDB key for remote debugging where debuggee is the name of the machine to debug (which must resolve to the IP address of the interface), and the rest of the line corre- sponds to the definition of IPKDBKEY (see below). For ipkdb to actually see this packet, the interface which is used for debugging has to be set up to actually receive packets, i.e. it has to be up and running. To prevent messing around with a secured system, ipkdb normally also checks the security level at which the kernel is running. ipkdb will only work with security levels less than 1, unless the kernel is configured with options IPKDBSECURE. In addition, the debugger is forcedly entered on a panic, as well as on initial startup, if you boot the kernel with the -d option (note that this however is machine dependent). On such a forced enter to ipkdb there is no need for the interface in question to already be up and run- ning, since ipkdb only needs to send/receive packets via its own driver. As some form of security against the occasional hacker, ipkdb uses the definition of options IPKDBKEY to compute a checksum on the data in every packet. The remote debugger has to send this checksum, based on the data it sends and the key, or ipkdb ignores the packet. This is also used in order to check against data errors on the connection. SEE ALSO
gdb(1), ddb(4), ip(4), udp(4), init(8) HISTORY
ipkdb appeared in NetBSD 1.3 for the first time. Its configuration and setup changed quite a bit in NetBSD 1.5. BUGS
Since the kernel includes the definition of IPKDBKEY, anyone who can read the kernel can extract it and use it to enter ipkdb. There is no support for ip6(4). BSD
March 27, 2000 BSD
All times are GMT -4. The time now is 12:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy