Status of Memory view?
Friedrich W. H. Kossebau
kossebau at kde.org
Mon Jan 16 19:20:31 UTC 2017
Am Montag, 16. Januar 2017, 22:45:25 CET schrieb Morten Volden:
> I kinda miss the memory view in kdevelop/debuggers/gdb (memviewdlg).
> I am a little unsure of its current state though. Its inclusion in the
> build depends on the CMAKE variable OKTETA_FOUND.
That was surely a helpless hack, as here the Okteta plugin (which implemented
the plugin interface) was a runtime dependency, not a build time. There
possibly was some find_package(Okteta) and respective FindOkteta.cmake with
KDevelop which has been removed since.
> As far as I can see that variable is never set since we are looking only
> for OktetaKastenControllers and KastenControllers in kdevelop/utils. Or
> maybe I am missing something?
While the OktetaKastenControllers CMake config file pulls indirectly in the
Okteta core/gui config CMake files IIRC (as the API is leaked into the Kasten
API variants), nothing should set a var named plainly OKTETA_FOUND. Anything
else might be a mistake.
> Also it includes byteseditinterface.h which used to reside in kdelibs, but
> I cannot find it anywhere in frameworks. Has it been replaced by something
The KHexEdit interfaces from kdelibs have been dumped on the switch from
kdelibs to KDE Frameworks, as there was only one implementation of them by the
plugin done with the Okteta libs. And given the very simple API of the
KHexEdit interfaces one usually was better of using the Okteta libs directly.
> Is anyone working on bringing back the memory view? (in some form or
Myself (as Okteta maintainer) not aware of.
> If not, I might be interested in taking on the job if someone can point me
> in the right(ish) direction.
I would (of course) recommend to make use of the basic Okteta libs here, which
are liboktetacore and liboktetagui (with some version ids added). They follow
roughly the pattern of QTextDocument and QTextView.
(Ignore any of Kasten libs coming with Okteta, Kasten is an additional
(unfinished) framework for which an Okteta extension is done. That one also
made sense with the hex editor plugin for KDevelop. But for this use-case the
overhead might be big and also limiting).
Sadly there is no tutorial, and for some API dox the best available is looking
at all the classes in the Okteta namespace at
Minimal starting code would be something like:
Okteta::ByteArrayModel* model = new Okteta::ByteArrayModel;
Okteta::ByteArrayColumnView* widget = new Okteta::ByteArrayColumnView(parent);
Perhaps one of the existing model classes is good enough, like the
ByteArrayModel, or you would subclass your own:
More information about the KDevelop-devel