case 'k': /* 'const' modifier */
case 'B': /* 'volatile' modifier */
/* just kinda ignore the modifier, I guess -gmt */
if (DEBUG_PTS_ReadTypedef(ptd, NULL, &ref_dt) == -1) return -1;
new_dt = DEBUG_NewDataType(DEBUG_GetType(ref_dt), NULL);
/* I don't get this.. but I figure this is kind of like "r"
so I cut and pasted from there ... -gmt */
assert(!*DEBUG_FileSubNr2StabEnum(filenr1, subnr1));
*DEBUG_FileSubNr2StabEnum(filenr1, subnr1) = new_dt; break; case '(': ptd->ptr--;
this should rather be: + break; + case 'k': /* 'const' modifier */ + case 'B': /* 'volatile' modifier */ + /* just kinda ignore the modifier, I guess -gmt */ + if (DEBUG_PTS_ReadTypedef(ptd, NULL, &new_dt) == -1) return -1;
patch is untested anyway (gcc 2.95 doesn't emit those, even in -g3 mode) however, it's strange that your gdb like debuggers crash in -gstabs2 mode IMO, we should keep (as of today) wine in -gstabs2 mode and not jump to level 3
A+
On Sunday 29 September 2002 08:53 am, Eric Pouech wrote:
however, it's strange that your gdb like debuggers crash in -gstabs2 mode
no crashes, just some weirdness. using -gstabs2, I get relative paths all over the place, including lots of "../../xxx.c" paths, laid out in an inconsistent manner. Sometimes it's just looking for "xxx.c", etc. It becomes very hard to satiate all of these. I've seen posts from other people (can't seem to find any examples now) who seem to have the same problem (i.e., "I run ddd and it says 'cant find main.c'"). When I use -gstabs3, the problem vanishes, and both native debuggers and winedbg seem much happier. Probably a gcc3.2-specific problem.
BTW, I did manage to crash things in gdb proxy mode. Running Delphi 5 (my unrealistic fantasy is to get integrated debugging working in Delphi), I hit (in programs/winedbg/gdbproxy.c):
1853 i = write(gdbctx->sock, gdbctx->out_buf, gdbctx->out_len);
1854 assert(i == gdbctx->out_len);
1855 /* if this fails, we'll have to use POLLOUT... 1856 */
I'm looking into fixing this myself, but don't hold your breath.
I'll submit another patch to handle 'k' and 'B' symbols as you describe. I'm glad to see your way works, I considered that, but I thought it was too good to be true :) Now that I look at what I was doing, the union doesn't get copied over so it's probably even more incorrect than I thought.
Also: I've printed out the 100+ page Dwarf II spec. It's probably /way/ beyond my abilities to implement Dwarf II for winedbg but I figure it'd be an interesting learning experience to try, and I noticed that this is on the TODO list. Again, don't hold your breath, chances of even limited success at this point in my learning curve are VERY slim!
Another, more realistic, side-project I'm considering is to implement tab-completion and up-down arrow command-history in winedbg. It looks like to achieve this I'd need to split the code for reading lines into interactive and noninteractive modes... got any smart advice on this? Is there any good reason /not/ to do it?
BTW, I did manage to crash things in gdb proxy mode. Running Delphi 5 (my unrealistic fantasy is to get integrated debugging working in Delphi), I hit (in programs/winedbg/gdbproxy.c):
1853 i = write(gdbctx->sock, gdbctx->out_buf, gdbctx->out_len);
1854 assert(i == gdbctx->out_len);
1855 /* if this fails, we'll have to use POLLOUT... 1856 */
I'm looking into fixing this myself, but don't hold your breath.
well, it means that we need to implement the pollout stuff for writting our buffer back... not very complicated, but not the easiest stuff to start with
Also: I've printed out the 100+ page Dwarf II spec. It's probably /way/ beyond my abilities to implement Dwarf II for winedbg but I figure it'd be an interesting learning experience to try, and I noticed that this is on the TODO list.
DwarfII shouldn't be on the TODO list. IMO, it's way better to integrate PDB (and the like) symbol manipulation in gdb and use the proxy version of winedbg
Another, more realistic, side-project I'm considering is to implement tab-completion and up-down arrow command-history in winedbg.
- for the up/down, it's already in there... (in fact, use the emacs form of command ctrl-P ctrl-N - if you really want up/down, you just need to change the mode of the console (in winedbg.c) (or move this settings as a configuration option) - implementing tab completion would require quite of work + reimplement tab processing + reimplement lexical analysis => I'm not sure it's worth it... for most commands you have shortcuts which speed up things
A+