Hi,
I like the DDD/GDB combo, but I run into some problems in places. I have
included a simple test case to illustrate.
I'm using
GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
Copyright 2004 Free Software Foundation, Inc.
and the log file covers the version of DDD I'm using.
The comments in my test case:
======================================
This test case is intended to demonstrate how asterisks are treated as
wildcards when appearing in the argument list for a procedure or function,
and other problems with the parsing of text in the ddd parser line,
which might be fine for little programs, but for large ones makes ddd/gdb
difficult to use.
Build with the command:
g++ -g testCase.cpp -o testCase
Run in the ddd with:
ddd testCase &
At the ddd command line:
break 'function1(const char *<tab>
a couple of results can occur:
1. a list of all known types appears. That's usesless and wrong since you
have a complete type to the left of the position where tab is pressed.
When you have a program with > 200K types, you might as well kill the
ddd session and start again.
2. The types appear after the "*" with a "." and some type name:
break 'function1(const char *._17'
The "*" should be treated as a wildcard when escaped and shouldn't be
treated as one if the type is complete to its left. If it falls at the end
of a string, maybe, but that currently doesn't work.
Note that
break 'function1<tab>
break 'function1(<tab>
break 'function1(char<tab>
completes to
break 'function1(char const*)'
but
break 'function1(char <tab>
does not. Note the blank following "char".
Note that
break 'function1(const char * pStr<tab>
doesn't complete (you get the bell sounding).
When you do
break function4(const char *,<tab>
you get the list of all types again, not the list of possible
completions for function4.
================================================
Thanks,
Chris Arena
------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
/*
This test case is intended to demonstrate how asterisks are treated as
wildcards when appearing in the argument list for a procedure or function,
and other problems with the parsing of text in the ddd parser line,
which might be fine for little programs, but for large ones makes ddd/gdb
difficult to use.
Build with the command:
g++ -g testCase.cpp -o testCase
Run in the ddd with:
ddd testCase &
At the ddd command line:
break 'function1(const char *<tab>
a couple of results can occur:
1. a list of all known types appears. That's usesless and wrong since you
have a complete type to the left of the position where tab is pressed.
When you have a program with > 200K types, you might as well kill the
ddd session and start again.
2. The types appear after the "*" with a "." and some type name:
break 'function1(const char *._17'
The "*" should be treated as a wildcard when escaped and shouldn't be
treated as one if the type is complete to its left. If it falls at the end
of a string, maybe, but that currently doesn't work.
Note that
break 'function1<tab>
break 'function1(<tab>
break 'function1(char<tab>
completes to
break 'function1(char const*)'
but
break 'function1(char <tab>
does not. Note the blank following "char".
Note that
break 'function1(const char * pStr<tab>
doesn't complete (you get the bell sounding).
When you do
break function4(const char *,<tab>
you get the list of all types again, not the list of possible
completions for function4.