Re: GDB C API -- does such a thing exist?

Jan Kratochvil <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On Fri, 17 Oct 2014 01:45:17 +0200, Stan Shebs wrote:
> The fact of the situation is that a C API would make things harder, not
> easier.  Consider that GDB is a) making system calls, which are
> sometimes blocking, b) is doing tricks with signals all over the place,

Yes but those are cornercases.

> and c) gets involved with permissions,

I do not see what you mean there.

> and d) manages vast quantities of memory.

What's the problem with multi-process vs. single-process solution?
The problem is that GDB corrupts memory as it is not written in C++.
I was trying to switch GDB to C++ which was rejected and then I at least
posted some -fsanitize=address patches which were ignored.


> MI is really the safe way to go.

The problem with MI is that there is (AFAIK) still no good enough client
library and primarily MI implements only very poor subset of GDB functionality
so one has to use '-interpreter-exec console ...' anyway and parse the
unparsable text output.

Thanks but C API is much easier (C++ would be sure even easier).  LLDB has C++
API but that can never work well for GDB due to GPL of GDB.


Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.