Jump to page: 1 2
Thread overview
GDB - lets make D support awesome
Nov 18, 2013
Iain Buclaw
Nov 18, 2013
Iain Buclaw
Nov 18, 2013
Iain Buclaw
Nov 19, 2013
Samuel Lampa
Nov 18, 2013
Bruno Medeiros
Nov 18, 2013
Walter Bright
Nov 18, 2013
Iain Buclaw
Nov 18, 2013
Iain Buclaw
Nov 18, 2013
Nick
Nov 21, 2013
Martin Nowak
Nov 27, 2013
Jerry
Nov 27, 2013
Iain Buclaw
Nov 27, 2013
Jerry
Dec 03, 2013
Martin Nowak
Dec 03, 2013
Iain Buclaw
Nov 27, 2013
Brad Roberts
Nov 28, 2013
Iain Buclaw
Dec 02, 2013
Jerry
Dec 03, 2013
Martin Nowak
November 18, 2013
Hi,

I've created a gdb fork on github and will be giving d-lang support some love - with the intention of pushing patches back to gdb development as soon as possible.  The bulk of the work will be done over the next fortnight, but for some other work (see buglink) will take a couple more months to roll out as changes on both gdb and compilers need to be aligned up.

https://d.puremagic.com/issues/show_bug.cgi?id=9800


If anybody is interesting in helping out.  Would be great to get people developing, testing, and sending suggestions for features/fixes on it.  Especially users of dmd/ldc to jump on board to ensure that changes done don't break the existing support that you may have.


Note #numero uno:
To anyone who wants to send patches, do bare in mind that GDB is a GPLv3+ project, and any significant contributions require you to sign FSF copyright assignment papers.  If you do not agree with GPLv3+ or are unable to, or don't agree with reassigning your copyright (eg: your company owns your IP), then this project is not for you.

For those who can contribute, feel free to fork me here:
https://github.com/ibuclaw/gdb


Note #numero due:
There are a few bug reports here and there, and a few ideas I've got scribbled down around the place.  A new DIP should perhaps be created to consolidate all these thoughts together.


Note #numero tre:
Any changes to the DWARF specification will need to be raised as a new issue with details of change and relevant sections.  Lets go through the proper channels this time round rather than inventing tags/attributes on the fly.


That is all.

November 18, 2013
On Monday, 18 November 2013 at 10:41:26 UTC, Iain Buclaw wrote:
>
> For those who can contribute, feel free to fork me here:
> https://github.com/ibuclaw/gdb
>
>

For those that want to test, here's the checkout/build steps.

# Checkout
git clone https://github.com/ibuclaw/gdb.git
mkdir gdb/objdir

# Build
cd gdb/objdir
../configure --prefix=/usr
make all-gdb

# Install
sudo make install-gdb


Regards
Iain.
November 18, 2013
For those that like gdb, you may also be interesting in using cgdb (if you haven't already come across it).

Fresh copy has latest support with D syntax highlighting:

https://github.com/cgdb/cgdb


November 18, 2013
On 18/11/2013 10:41, Iain Buclaw wrote:
> Especially users of dmd/ldc to jump on board to ensure that changes done
> don't break the existing support that you may have.

Wait, you can use GDB to debug programs created with LDC? Ah, I see, the LLVM suite generates standard DWARF debug information:
http://llvm.org/docs/SourceLevelDebugging.html#philosophy-behind-llvm-debugging-information

I need to try out this in practice and see how well it works.

-- 
Bruno Medeiros - Software Engineer
November 18, 2013
On 11/18/2013 2:41 AM, Iain Buclaw wrote:
> Hi,
>
> I've created a gdb fork on github and will be giving d-lang support some love -
> with the intention of pushing patches back to gdb development as soon as
> possible.  The bulk of the work will be done over the next fortnight, but for
> some other work (see buglink) will take a couple more months to roll out as
> changes on both gdb and compilers need to be aligned up.
>
> https://d.puremagic.com/issues/show_bug.cgi?id=9800

Here's a list of symbolic debug info bugs in dmd:

https://d.puremagic.com/issues/buglist.cgi?keywords=symdeb&query_format=advanced&keywords_type=allwords&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED

Fixing these will, of course, also help with gdb usability.
November 18, 2013
On 18 November 2013 10:41, Iain Buclaw <ibuclaw@ubuntu.com> wrote:

> Hi,
>
> I've created a gdb fork on github and will be giving d-lang support some love - with the intention of pushing patches back to gdb development as soon as possible.  The bulk of the work will be done over the next fortnight, but for some other work (see buglink) will take a couple more months to roll out as changes on both gdb and compilers need to be aligned up.
>
> https://d.puremagic.com/issues/show_bug.cgi?id=9800
>
>
And so it begins...

https://github.com/ibuclaw/gdb/commit/dda127be8f6d2984b6f9a7d45efeb0871d82c220

(This copy of GDB will now search for 'D main' and point to its source
location).


-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


November 18, 2013
On 18 November 2013 20:52, Walter Bright <newshound2@digitalmars.com> wrote:

> On 11/18/2013 2:41 AM, Iain Buclaw wrote:
>
>> Hi,
>>
>> I've created a gdb fork on github and will be giving d-lang support some
>> love -
>> with the intention of pushing patches back to gdb development as soon as
>> possible.  The bulk of the work will be done over the next fortnight, but
>> for
>> some other work (see buglink) will take a couple more months to roll out
>> as
>> changes on both gdb and compilers need to be aligned up.
>>
>> https://d.puremagic.com/issues/show_bug.cgi?id=9800
>>
>
> Here's a list of symbolic debug info bugs in dmd:
>
> https://d.puremagic.com/issues/buglist.cgi?keywords= symdeb&query_format=advanced&keywords_type=allwords&bug_ status=NEW&bug_status=ASSIGNED&bug_status=REOPENED
>
> Fixing these will, of course, also help with gdb usability.
>


Yeah, I can't of course fix what debug information DMD produces, but I can make GDB better handle D types when it is passed the correct information.

-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


November 18, 2013
On Monday, 18 November 2013 at 10:41:26 UTC, Iain Buclaw wrote:
> Hi,
>
> I've created a gdb fork on github and will be giving d-lang support some love - with the intention of pushing patches back to gdb development as soon as possible.

This is fantastic. I commend you for this work to make D debugging much more practical!
November 19, 2013
On 2013-11-18 12:05, Iain Buclaw wrote:
> For those that like gdb, you may also be interesting in using cgdb (if you haven't already come across it).
>
> Fresh copy has latest support with D syntax highlighting:
>
> https://github.com/cgdb/cgdb 

Agreed. cgdb is sweet stuff. It was what made gdb debugging usable for me.

// Samuel
November 21, 2013
On 11/18/2013 11:41 AM, Iain Buclaw wrote:
> Hi,
>
> I've created a gdb fork on github and will be giving d-lang support some
> love - with the intention of pushing patches back to gdb development as
> soon as possible.  The bulk of the work will be done over the next
> fortnight, but for some other work (see buglink) will take a couple more
> months to roll out as changes on both gdb and compilers need to be
> aligned up.
>
> https://d.puremagic.com/issues/show_bug.cgi?id=9800
>
Great, I also want to look into this in the next few days.
Mostly improving what dmd emits.

> Note #numero due:
> There are a few bug reports here and there, and a few ideas I've got
> scribbled down around the place.  A new DIP should perhaps be created to
> consolidate all these thoughts together.
>
Just file them in bugzilla. IMHO DIPs are for language enhancements.

> Note #numero tre:
> Any changes to the DWARF specification will need to be raised as a new
> issue with details of change and relevant sections.  Lets go through the
> proper channels this time round rather than inventing tags/attributes on
> the fly.
>
I didn't saw much need to extend any DWARF specs.
It's all there, even arrays et.al. in DWARF4.

The current D support in gdb treats every struct with a ptr and length field as array.
I also prefixed the array types (_Array_char) so they can be recognized better by gdb, pretty-printing is missing though and I don't know whether the element types are correctly tagged.
« First   ‹ Prev
1 2