Page MenuHomePhabricator

polyakov.alex (Alexander Polyakov)
User

Projects

User does not belong to any projects.

User Details

User Since
Feb 28 2018, 12:11 PM (81 w, 12 h)

Recent Activity

Aug 7 2018

polyakov.alex abandoned D47302: [WIP] New class SBTargetSettings to store and manipulate all target's properties..

Abandoned since suggested functionality is already done in https://reviews.llvm.org/D49739.

Aug 7 2018, 2:51 PM

Jun 18 2018

polyakov.alex updated the diff for D47302: [WIP] New class SBTargetSettings to store and manipulate all target's properties..

As we discussed previously, it would be nice to have a class in SB API that will manipulate with SBTarget's properties.
I started to work on this and , as I expected, faced with a problem:
TargetProperties class doesn't have a property with image search paths while Target does. It means that we should have a pointer to Target to implement things like
SBTargetSettings::AppendImageSearchPath(const char *from, const char *to, SBError &error).

Jun 18 2018, 4:23 AM

Jun 11 2018

polyakov.alex added inline comments to D47838: [lldb-mi] Re-implement MI -exec-step command..
Jun 11 2018, 9:26 AM

Jun 9 2018

polyakov.alex updated the diff for D47838: [lldb-mi] Re-implement MI -exec-step command..

Removed unnecessary m_lldbResult attribute, updated python test to successfully process new error messages in exec-step command.

Jun 9 2018, 11:26 AM

Jun 8 2018

polyakov.alex updated the diff for D47415: [lldb, lldb-mi] Re-implement MI -exec-continue command..

Removed unnecessary m_lldbResult attribute.

Jun 8 2018, 5:01 AM

Jun 7 2018

polyakov.alex added inline comments to D47415: [lldb, lldb-mi] Re-implement MI -exec-continue command..
Jun 7 2018, 2:14 PM
polyakov.alex added inline comments to D47415: [lldb, lldb-mi] Re-implement MI -exec-continue command..
Jun 7 2018, 1:41 PM
polyakov.alex updated the diff for D47415: [lldb, lldb-mi] Re-implement MI -exec-continue command..

Updated because of commited -exec-next and -exec-step commands.

Jun 7 2018, 12:44 PM
polyakov.alex updated the diff for D47838: [lldb-mi] Re-implement MI -exec-step command..

Changes for using thread ids in a gdb way. Also added case of specified thread into test case.

Jun 7 2018, 7:44 AM
polyakov.alex updated the diff for D47797: [lldb-mi] Re-implement MI -exec-next command..

Changes for using thread ids in a gdb way. Also added case of specified thread into test case.

Jun 7 2018, 7:15 AM
polyakov.alex added a comment to D47838: [lldb-mi] Re-implement MI -exec-step command..

I don't know if there is any spec about what the gdb-mi protocol should use for thread identification, but I think the most important part is to be consistent. If you use indexes in one place and tid's in another you'll confuse the hell out of clients trying to talk to lldb-mi.

Jun 7 2018, 6:55 AM

Jun 6 2018

polyakov.alex added a comment to D47838: [lldb-mi] Re-implement MI -exec-step command..

I'm a little bit confused about situation with thread id. For example:

(gdb)
thread list
~"Process 31642 stopped\n* thread #1: tid = 31642, 0x000000000041eed0 bash`main, name = 'bash', stop reason = breakpoint 1.1\n"
^done
Jun 6 2018, 11:34 AM
polyakov.alex created D47838: [lldb-mi] Re-implement MI -exec-step command..
Jun 6 2018, 11:23 AM
polyakov.alex added inline comments to D47797: [lldb-mi] Re-implement MI -exec-next command..
Jun 6 2018, 8:05 AM
polyakov.alex updated the diff for D47797: [lldb-mi] Re-implement MI -exec-next command..

Added some checks for invalid thread id.

Jun 6 2018, 8:01 AM

Jun 5 2018

polyakov.alex created D47797: [lldb-mi] Re-implement MI -exec-next command..
Jun 5 2018, 1:50 PM

Jun 3 2018

polyakov.alex added a comment to D47302: [WIP] New class SBTargetSettings to store and manipulate all target's properties..

Do you know another way of implementing AppendImageSearchPaths method?

Jun 3 2018, 8:45 AM
polyakov.alex added a comment to D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows..

Thank you.

Jun 3 2018, 8:37 AM
polyakov.alex added a comment to D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows..

Due to https://reviews.llvm.org/D47678 we can enable this test with a XFAIL directive for Windows.

Not true. As I said, the original review when I disabled the test has the log of what happens when you give it the correct path and the test still hangs in that scenario. If you XFAIL it, it will hang.

Jun 3 2018, 8:07 AM
polyakov.alex added a comment to D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows..

You can actually follow the pattern in the other tests and do:

%cc -o %t %p/inputs/break-insert.c -g

%t then becomes the name of the output file and you can use that in our other commands. This is better than specifying a hardcoded name.

Jun 3 2018, 3:02 AM
polyakov.alex updated the diff for D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows..

Due to https://reviews.llvm.org/D47678 we can enable this test with a XFAIL directive for Windows.

Jun 3 2018, 2:59 AM
polyakov.alex updated the diff for D47678: [lldb, lldm-mi] Fix hanging of -exec-run command..

Added the test.

Jun 3 2018, 2:41 AM

Jun 2 2018

polyakov.alex added a comment to D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows..

You are right. I think that the reason of exiting *normally is much deeper. I'll look at this, but for now I don't have any idea about what this may be caused by, do you have one?

Jun 2 2018, 4:00 PM
polyakov.alex added a comment to D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows..

I would really appreciate if you guys can check this test on Windows again.

Jun 2 2018, 3:44 PM
polyakov.alex created D47679: [lldb, lldb-mi] Enable lldb-mi -break-insert test on Windows..
Jun 2 2018, 3:41 PM
polyakov.alex updated the diff for D47678: [lldb, lldm-mi] Fix hanging of -exec-run command..

A bit of refactoring.

Jun 2 2018, 2:43 PM
polyakov.alex added a comment to D47678: [lldb, lldm-mi] Fix hanging of -exec-run command..

These changes fix the hanging of the lldb-mi lit tests. For example:
-file-exec-and-symbols a.out
-exec-run
commands in test may cause a hanging if a.out is invalid name of binary.

Jun 2 2018, 2:35 PM
polyakov.alex created D47678: [lldb, lldm-mi] Fix hanging of -exec-run command..
Jun 2 2018, 1:08 PM
polyakov.alex added a comment to D47651: [lit, lldbmi] Skip the new break-insert test on Windows.

I have got a few ideas about what may cause such a behavior. I'll check them out as soon as possible.

Jun 2 2018, 4:26 AM

May 26 2018

polyakov.alex updated the summary of D47415: [lldb, lldb-mi] Re-implement MI -exec-continue command..
May 26 2018, 11:23 AM
polyakov.alex created D47415: [lldb, lldb-mi] Re-implement MI -exec-continue command..
May 26 2018, 11:23 AM

May 25 2018

polyakov.alex added a comment to D47302: [WIP] New class SBTargetSettings to store and manipulate all target's properties..

no. Create a new SBTargetSettings class. SBTarget will hand one out for global and for target instance settings, Add all settings accessors to SBTargetSettings class

What is a difference between SBTargetSettings and TargetProperties classes except API level?

Not much difference except everything in SBTargetSettings will need to be public C++ API safe (no virtual functions, one member variable in the class that is a pointer std::unique_ptr or std::shared_ptr, no inheritance, no STL in args or return values, no lldb_private classes in args or return values. For this class to be API safe, we will actually need to keep a shared pointer to the target properties. So the class in the API header will be something like:

namespace lldb {
  SBTargetSettings {
    lldb::TargetPropertiesSP m_opaque_sp;
  };
}

Then m_opaque_sp will be filled in by assigning from a TargetSP (since a shared pointer to a target can be converted to a TargetPropertiesSP since Target inherits from TargetProperties) or from a call to Target::GetGlobalProperties(). And then we pass through all accessors we need.

May 25 2018, 11:58 AM

May 24 2018

polyakov.alex added a comment to D47302: [WIP] New class SBTargetSettings to store and manipulate all target's properties..

no. Create a new SBTargetSettings class. SBTarget will hand one out for global and for target instance settings, Add all settings accessors to SBTargetSettings class

May 24 2018, 2:01 PM
polyakov.alex added a comment to D47302: [WIP] New class SBTargetSettings to store and manipulate all target's properties..

It might make sense to create a new SBTargetSettings class that has accessors. Then we can have to accessors on SBTarget:

class SBTarget {
  static SBTargetSettings GetGlobalSettings();
  SBTargetSettings GetSettings();
};

What global settings should be in your opinion? I guess that they should be stored in the SBDebugger, and a typical use case for them would be:

SBTarget target;
target.HookUpGlobalSettings;

I would code it exactly as I specified above. Ask the SBTarget for its settings. We would only expose the "target.*" settings through the SBTargetSettings class. SBDebugger could have its own settings for everything that is stored in the Debugger.cpp g_properties variable, those would be in SBDebuggerSettings if we need access to those:

class SBDebugger {
  static SBDebuggerSettings GetGlobalSettings();
  SBDebuggerSettings GetSettings();
};

This allows us to expose settings in a way that would allow us to serialize the settings and then load them again later.

class SBTargetSettings {
  // Accessors for "target...." setting
  void AppendImageSearchPath(const char *from, const char *to);
  size_t GetNumImageSearchPaths();
  const char *GetImageSearchPathAtIndex(size_t i);
  // Save and load all settings
  void Load(SBStream &s);
  void Save(SBStream &s);
};

Serialization sounds good, but, to accurately understand you, do you mean "classic" serialization with saving data into the file or serialization just for the time when debugger is run?

SBStream can be a string buffer or a file. We should probably save to JSON and load from JSON. But that doesn't need to be done in this patch.

So, for now we'll just save settings to a string buffer?

Don't worry about saving/loading in this patch. That was just a proposed future direction we can easily do once we have the SBTargetOptions class split out into its own class. So concentrate on making a SBTargetOptions and optionally the SBDebuggerOptions class if you need access to debugger settings as well.

May 24 2018, 11:56 AM
polyakov.alex added a comment to D47302: [WIP] New class SBTargetSettings to store and manipulate all target's properties..

It might make sense to create a new SBTargetSettings class that has accessors. Then we can have to accessors on SBTarget:

class SBTarget {
  static SBTargetSettings GetGlobalSettings();
  SBTargetSettings GetSettings();
};

What global settings should be in your opinion? I guess that they should be stored in the SBDebugger, and a typical use case for them would be:

SBTarget target;
target.HookUpGlobalSettings;

I would code it exactly as I specified above. Ask the SBTarget for its settings. We would only expose the "target.*" settings through the SBTargetSettings class. SBDebugger could have its own settings for everything that is stored in the Debugger.cpp g_properties variable, those would be in SBDebuggerSettings if we need access to those:

class SBDebugger {
  static SBDebuggerSettings GetGlobalSettings();
  SBDebuggerSettings GetSettings();
};

This allows us to expose settings in a way that would allow us to serialize the settings and then load them again later.

class SBTargetSettings {
  // Accessors for "target...." setting
  void AppendImageSearchPath(const char *from, const char *to);
  size_t GetNumImageSearchPaths();
  const char *GetImageSearchPathAtIndex(size_t i);
  // Save and load all settings
  void Load(SBStream &s);
  void Save(SBStream &s);
};

Serialization sounds good, but, to accurately understand you, do you mean "classic" serialization with saving data into the file or serialization just for the time when debugger is run?

SBStream can be a string buffer or a file. We should probably save to JSON and load from JSON. But that doesn't need to be done in this patch.

May 24 2018, 10:59 AM
polyakov.alex added a comment to D47302: [WIP] New class SBTargetSettings to store and manipulate all target's properties..

It might make sense to create a new SBTargetSettings class that has accessors. Then we can have to accessors on SBTarget:

class SBTarget {
  static SBTargetSettings GetGlobalSettings();
  SBTargetSettings GetSettings();
};
May 24 2018, 10:13 AM

May 23 2018

polyakov.alex updated the diff for D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..

Removed underscore in the lldb-mi variable from lit.cfg.

May 23 2018, 5:35 PM · Restricted Project
polyakov.alex added inline comments to D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..
May 23 2018, 5:25 PM · Restricted Project
polyakov.alex added a comment to D47302: [WIP] New class SBTargetSettings to store and manipulate all target's properties..

The missing context here is that the lldb-mi -target-select command currently calls HandleCommand("target modules search-paths add", ...).
Is adding a new SBAPI the right approach to implementing this functionality without going through HandleCommand? Or is HandleCommand appropriate in this case?

May 23 2018, 5:03 PM
polyakov.alex created D47302: [WIP] New class SBTargetSettings to store and manipulate all target's properties..
May 23 2018, 4:38 PM

May 21 2018

polyakov.alex updated the diff for D47110: [LLDB, lldb-mi] Add option --synchronous..

Moved the option parsing code down by the others.

May 21 2018, 9:46 AM

May 19 2018

polyakov.alex updated the diff for D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..

This version of commit uses the new lldb-mi option that I added to review https://reviews.llvm.org/D47110.

May 19 2018, 2:12 PM · Restricted Project
polyakov.alex added a comment to D47110: [LLDB, lldb-mi] Add option --synchronous..

This option is needed by https://reviews.llvm.org/D46588.

May 19 2018, 2:06 PM
polyakov.alex created D47110: [LLDB, lldb-mi] Add option --synchronous..
May 19 2018, 2:05 PM

May 17 2018

polyakov.alex added a comment to D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..

For the experiment you can probably just stick it into CMICmnLLDBDebugger::InitSBDebugger().

May 17 2018, 10:08 AM · Restricted Project
polyakov.alex added a comment to D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..

My overall mental image of lldb-mi is very incomplete, but I'm imagining lldb-mi as having one thread that wakes up every n milliseconds checks for command input and then calls into the SBAPI to handle the commands. If that is how it works, then one very simple thing we can try is to call SBDebugger::SetAsync(false), thus forcing all the SBAPI calls to block until completion.

Alexander, can you see what happens to your lit test when you enable synchronous mode in the SBAPI? Does it block now as expected, or does it still finish early? If that experiment works, we could add a --async command line option to lldb-mi to enable this behavior for running the test suite.

May 17 2018, 9:18 AM · Restricted Project

May 16 2018

polyakov.alex updated the diff for D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..

I have all the patches I was sending. I will follow this topic until you decide what to do with lldb-mi testing.

May 16 2018, 9:57 AM · Restricted Project

May 15 2018

polyakov.alex added inline comments to D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..
May 15 2018, 2:41 PM · Restricted Project
polyakov.alex added inline comments to D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..
May 15 2018, 12:47 PM · Restricted Project
polyakov.alex added inline comments to D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..
May 15 2018, 5:16 AM · Restricted Project
polyakov.alex added inline comments to D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..
May 15 2018, 3:53 AM · Restricted Project
polyakov.alex added a comment to D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..

Also, I combined FileCheck commands and lldb-mi input in a single file.

May 15 2018, 3:34 AM · Restricted Project
polyakov.alex updated the diff for D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..

Created separate directory for an lldb-mi tests.

May 15 2018, 3:31 AM · Restricted Project

May 14 2018

polyakov.alex added inline comments to D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..
May 14 2018, 2:47 PM · Restricted Project
polyakov.alex added inline comments to D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..
May 14 2018, 2:44 PM · Restricted Project
polyakov.alex updated the diff for D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..

Added more comments about the test.

May 14 2018, 2:41 PM · Restricted Project

May 12 2018

polyakov.alex updated the diff for D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..

Added comments describing which lldb-mi command's output is currently parsing.

May 12 2018, 4:41 PM · Restricted Project
polyakov.alex updated the diff for D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..

Moved tests to lit.

May 12 2018, 4:23 PM · Restricted Project

May 10 2018

polyakov.alex added a comment to D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..

So, what do you think about the patch? There is no any decision about lldb-mi tests and I do not know what to do with this.

May 10 2018, 12:10 PM · Restricted Project

May 9 2018

polyakov.alex updated the summary of D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..
May 9 2018, 7:08 AM · Restricted Project
polyakov.alex updated the diff for D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..

Added testcase and updated revision.

May 9 2018, 7:06 AM · Restricted Project

May 8 2018

polyakov.alex added inline comments to D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..
May 8 2018, 10:30 AM · Restricted Project
polyakov.alex created D46588: [LLDB][lldb-mi] Add possibility to set breakpoints without selecting a target..
May 8 2018, 10:28 AM · Restricted Project

Mar 3 2018

polyakov.alex added a comment to D44040: Add test for lldb-mi interpreter.

Thanks for your time.

Mar 3 2018, 7:44 AM · Restricted Project, Restricted Project
polyakov.alex updated the diff for D44040: Add test for lldb-mi interpreter.

Added . to the end of sentences in comments.

Mar 3 2018, 1:26 AM · Restricted Project, Restricted Project

Mar 2 2018

polyakov.alex updated the diff for D44040: Add test for lldb-mi interpreter.

As we have current executable file in test, it would be better to use it in search pattern.

Mar 2 2018, 12:29 PM · Restricted Project, Restricted Project
polyakov.alex created D44040: Add test for lldb-mi interpreter.
Mar 2 2018, 12:16 PM · Restricted Project, Restricted Project