[Lldb-commits] [PATCH] D42145: [lldb] Use vFlash commands when writing to target's flash memory regions

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 5 03:52:25 PST 2018


labath added a comment.

In https://reviews.llvm.org/D42145#996575, @owenpshaw wrote:

> - adjust WriteObjectFile signature to return Status and take an std::vector
> - match project formatting style
>
>   I toyed with adding allow_flash to as an argument, but didn't really like it because it seemed to bring things back to basically allowing arbitrary flash writes via WriteMemory, and would affect all the process subclasses when only one (gdb) actually needs it.  I still like the member flag because it keeps the flash writing very private to ProcessGDB.


If we called the argument `writing_object_file` instead of `allow_flash`, then maybe we wouldn't be exposing flash details, although i'm not sure if it makes much of a difference. I guess we can keep the member flag for now...

> What can I do to get the xml dependency check in the test?  Not clear on who I should talk to or where to start.

Solution A would be to add some cmake code like

  configure_file(dotest_build_config.py.in dotest_build_config.py)

which would generate the config file with the xml flag substituted. Then, somewhere from the test you could load this file and check the value.

Solution B would be to add a function (static function on SBDebugger class maybe) which you could call from the test to query the properties the binary was built with.

I can start a thread on lldb-dev to see what people prefer. If noone cares enough to respond, then I guess you can pick whichever option you want.


https://reviews.llvm.org/D42145





More information about the lldb-commits mailing list