Help required debugging clang

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Help required debugging clang

Nathan Ridge via cfe-dev
Hello,

I am trying to debug clang++ with following program
template <class T> T::R f();

here it gives error:
 error: missing 'typename' prior to dependent type name 'T::R'
and I want to understand the complete flow where this error is generated.

For this purpose I put break point in clang code which uses
dianostic kind err_typename_missing but the break points never hits.

So in other approach I tried to debug from the main()
but after sys::ExecuteAndWait() it spawns new thread for clang-9 executable and then I can no longer debug it.

Can someone provide some pointer on how to find out the exact flow?

-Vivek


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Help required debugging clang

Nathan Ridge via cfe-dev
If you are using gdb  , check out "set follow-fork-mode child".

Umesh

On Sat, Jun 22, 2019, 15:19 vivek pandya via cfe-dev <[hidden email]> wrote:
Hello,

I am trying to debug clang++ with following program
template <class T> T::R f();

here it gives error:
 error: missing 'typename' prior to dependent type name 'T::R'
and I want to understand the complete flow where this error is generated.

For this purpose I put break point in clang code which uses
dianostic kind err_typename_missing but the break points never hits.

So in other approach I tried to debug from the main()
but after sys::ExecuteAndWait() it spawns new thread for clang-9 executable and then I can no longer debug it.

Can someone provide some pointer on how to find out the exact flow?

-Vivek

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Help required debugging clang

Nathan Ridge via cfe-dev
Thanks Umesh that works.

On Sat, Jun 22, 2019 at 3:32 PM Umesh Kalappa <[hidden email]> wrote:
If you are using gdb  , check out "set follow-fork-mode child".

Umesh

On Sat, Jun 22, 2019, 15:19 vivek pandya via cfe-dev <[hidden email]> wrote:
Hello,

I am trying to debug clang++ with following program
template <class T> T::R f();

here it gives error:
 error: missing 'typename' prior to dependent type name 'T::R'
and I want to understand the complete flow where this error is generated.

For this purpose I put break point in clang code which uses
dianostic kind err_typename_missing but the break points never hits.

So in other approach I tried to debug from the main()
but after sys::ExecuteAndWait() it spawns new thread for clang-9 executable and then I can no longer debug it.

Can someone provide some pointer on how to find out the exact flow?

-Vivek

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Help required debugging clang

Nathan Ridge via cfe-dev
You can also pass `-###` to clang to get the forked command and just pass that to the debugger.


On Sat, Jun 22, 2019 at 5:33 AM vivek pandya via cfe-dev <[hidden email]> wrote:
Thanks Umesh that works.

On Sat, Jun 22, 2019 at 3:32 PM Umesh Kalappa <[hidden email]> wrote:
If you are using gdb  , check out "set follow-fork-mode child".

Umesh

On Sat, Jun 22, 2019, 15:19 vivek pandya via cfe-dev <[hidden email]> wrote:
Hello,

I am trying to debug clang++ with following program
template <class T> T::R f();

here it gives error:
 error: missing 'typename' prior to dependent type name 'T::R'
and I want to understand the complete flow where this error is generated.

For this purpose I put break point in clang code which uses
dianostic kind err_typename_missing but the break points never hits.

So in other approach I tried to debug from the main()
but after sys::ExecuteAndWait() it spawns new thread for clang-9 executable and then I can no longer debug it.

Can someone provide some pointer on how to find out the exact flow?

-Vivek

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev