public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Help with flags for static analysis
@ 2021-07-20 16:36 Abigail Matthews
  2021-07-20 17:27 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Abigail Matthews @ 2021-07-20 16:36 UTC (permalink / raw)
  To: gcc-help

Hello,

I am a PhD student in Computer Science at UW Wisconsin Madison. I have been
using gcc with the -fdump-rtl-expand-lineno and
-fdump-tree-cfg-lineno flags for my research doing some static analysis of
the linux kernel. I am in particular trying to parse inside line number
pairs for loops and function calls/pointers. For loops I want to find the
loop length/number of iterations or what the loop is dependent on. For
function calls and pointers I want to follow the function calls
recursively and repeat some of my static analysis along the full call
stack.

I am trying to find some flags that can give me more information than I
have coming from the current flags (or maybe differently formatted info),
but I am struggling to understand the flag options and dump formats. Even
with the flags I am already using to some success I find myself
struggling to understand the information already there, even with the
existing documentation. Is there anyone who knows more about these flags
and may be able to hear a bit more the info I am looking for and help point
me in the right direction? Any pointers or suggestions would be really
helpful.

Thank you,
Abby

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Help with flags for static analysis
  2021-07-20 16:36 Help with flags for static analysis Abigail Matthews
@ 2021-07-20 17:27 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2021-07-20 17:27 UTC (permalink / raw)
  To: Abigail Matthews; +Cc: gcc-help, David Malcolm

On Tue, 20 Jul 2021 at 17:37, Abigail Matthews wrote:
>
> Hello,
>
> I am a PhD student in Computer Science at UW Wisconsin Madison. I have been
> using gcc with the -fdump-rtl-expand-lineno and
> -fdump-tree-cfg-lineno flags for my research doing some static analysis of
> the linux kernel. I am in particular trying to parse inside line number
> pairs for loops and function calls/pointers. For loops I want to find the
> loop length/number of iterations or what the loop is dependent on. For
> function calls and pointers I want to follow the function calls
> recursively and repeat some of my static analysis along the full call
> stack.
>
> I am trying to find some flags that can give me more information than I
> have coming from the current flags (or maybe differently formatted info),
> but I am struggling to understand the flag options and dump formats. Even
> with the flags I am already using to some success I find myself
> struggling to understand the information already there, even with the
> existing documentation. Is there anyone who knows more about these flags
> and may be able to hear a bit more the info I am looking for and help point
> me in the right direction? Any pointers or suggestions would be really
> helpful.

Those options are meant to help GCC developers debug GCC itself, not
to expose the information for other uses. As a result, I'm not
surprised you're finding the output to be unhelpful for your purposes.

Maybe Dave Malcolm (CC'd) can offer a better suggestion, as he's been
working on the -fanalyzer feature.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-20 17:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-20 16:36 Help with flags for static analysis Abigail Matthews
2021-07-20 17:27 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).