Skip to content

Commit

Permalink
Fix Issue 14330 - Wrong DWARF type of dynamic array variable
Browse files Browse the repository at this point in the history
  • Loading branch information
tramker committed Mar 29, 2015
1 parent 99479d4 commit 614c756
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/dwarf.c
Expand Up @@ -1709,7 +1709,7 @@ unsigned dwarf_typidx(type *t)

tym_t ty;
ty = tybasic(t->Tty);
if (!(t->Tnext && (ty == TYucent || ty == TYcent)))
if (!(t->Tnext && (ty == TYdarray || ty == TYdelegate)))
{ // use cached basic type if it's not TYdarray or TYdelegate
idx = typidx_tab[ty];
if (idx)
Expand Down
21 changes: 21 additions & 0 deletions test/runnable/gdb14330.d
@@ -0,0 +1,21 @@
/*
REQUIRED_ARGS: -g
PERMUTE_ARGS:
GDB_SCRIPT:
---
b 20
r
echo RESULT=
p str
---
GDB_MATCH: RESULT=.*something
*/
module gdb;

__gshared ulong x;

void main()
{
string str = "something";
// BP
}

0 comments on commit 614c756

Please sign in to comment.