Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 78144 - incomplete command line options definition in main.cpp
Summary: incomplete command line options definition in main.cpp
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kdbg
Version: 8.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ngo Than
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-19 13:03 UTC by Need Real Name
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-11-19 13:05:49 UTC


Attachments (Terms of Use)
patch for main.cpp (deleted)
2002-11-19 13:05 UTC, Need Real Name
no flags Details | Diff

Description Need Real Name 2002-11-19 13:03:58 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Description of problem:
Source file kdbg/main.cpp contains incorrect definition for command 
line options.
This definition must be done in accordance with KDELIBS-3.0 documentation (see 
http://developer.kde.org/documentation/library/3.0-
api/classref/kdecore/KCmdLineArgs.html#KApplication).
The last structure of options array must be {0,0,0}.
But in  kdbg/main.cpp we see:
#-----------main.cpp----------------
......
static KCmdLineOptions options[] = {
        { "t <file>", I18N_NOOP("transcript of conversation with the 
debugger"), 0 },
        { "r <device>", I18N_NOOP("remote debugging via <device>"), 0 },
        { "+[program]", I18N_NOOP("path of executable to debug"), 0 },
        { "+[core]", I18N_NOOP("a core file to use"), 0}
    };......
#--------------------------------------
GCC 2.96 - and GCC 3.2-compiled chooser run succesfully.
But if another compiler (such as Intel C++ compiler for Linux) is being used 
chooser crashes in the function parseAllArgs () at kcmdlineargs.cpp 
line#536: "if (option->name[0] == '+')"

The simplest way to solve the problem is to add {0,0,0} at the end of command 
line options (patch is attached).


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.install Intel C++ compiler for Linux
2.build the "kdbg" package using Intel C++ compiler 
3.cd kdbg
4../kdbg

Actual Results:  Segmentation fault


Expected Results:  Application window must be shown

Additional info:

Comment 1 Need Real Name 2002-11-19 13:05:40 UTC
Created attachment 85550 [details]
patch for main.cpp

Comment 2 Ngo Than 2002-11-19 22:18:24 UTC
kdbg-1.2.4-10.2 or newer should include this fix. Thanks


Note You need to log in before you can comment on or make changes to this bug.