[lldb-dev] Symtab for PECOFF

2018-08-30 Thread Aleksandr Urakov via lldb-dev
Hello!

I'm working on an expressions evaluation on Windows, and currently I'm
trying to make a JIT evaluation working.

When I'm trying to evaluate the next expression:

print S::x


on the next code:

struct S {
  static int x;
  void foo() { }
};
int S::x = 5;

int main() {
  S().foo(); // here
  return 0;
}


the evaluation requires JIT (but printing of global variables requires not,
and I can't figure out what is the key difference between a class static
variable and a global variable in the case?).

During symbols resolving IRExecutionUnit::FindInSymbols is used, and it
searches a symbol among functions (which is not our case), and then calls
Module::FindSymbolsWithNameAndType for each module in the list. This
function looks symbols up in a Symtab, which is retrieved through a
SymbolVendor, and it retrieves one from an ObjectFile. ELF files contain
symbols for such a variables in their symbol tables, but the problem is
that PE files usually contain info about exported (and imported) symbols
only, so the lookup in Symtab fails.

I think that we need somehow to retrieve a symbols info from a symbol file.
I thought that we can emit a Symtab from a SymbolFile just like from an
ObjectFile (and for now implement it for SymbolFilePDB only), but I'm not
sure if this solution is good. How can we solve the problem else?

-- 
Aleksandr Urakov
Software Developer
JetBrains
http://www.jetbrains.com
The Drive to Develop
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] Symtab for PECOFF

2018-08-30 Thread Zachary Turner via lldb-dev
It seems reasonable to me to say that if the symbol is not found in the
executables symtab, it will fall back to searching in the symbol file..
this logic doesn’t even need to be specific to PDB
On Thu, Aug 30, 2018 at 7:00 AM Aleksandr Urakov via lldb-dev <
lldb-dev@lists.llvm.org> wrote:

> Hello!
>
> I'm working on an expressions evaluation on Windows, and currently I'm
> trying to make a JIT evaluation working.
>
> When I'm trying to evaluate the next expression:
>
> print S::x
>
>
> on the next code:
>
> struct S {
>   static int x;
>   void foo() { }
> };
> int S::x = 5;
>
> int main() {
>   S().foo(); // here
>   return 0;
> }
>
>
> the evaluation requires JIT (but printing of global variables requires
> not, and I can't figure out what is the key difference between a class
> static variable and a global variable in the case?).
>
> During symbols resolving IRExecutionUnit::FindInSymbols is used, and it
> searches a symbol among functions (which is not our case), and then calls
> Module::FindSymbolsWithNameAndType for each module in the list. This
> function looks symbols up in a Symtab, which is retrieved through a
> SymbolVendor, and it retrieves one from an ObjectFile. ELF files contain
> symbols for such a variables in their symbol tables, but the problem is
> that PE files usually contain info about exported (and imported) symbols
> only, so the lookup in Symtab fails.
>
> I think that we need somehow to retrieve a symbols info from a symbol
> file. I thought that we can emit a Symtab from a SymbolFile just like
> from an ObjectFile (and for now implement it for SymbolFilePDB only), but
> I'm not sure if this solution is good. How can we solve the problem else?
>
> --
> Aleksandr Urakov
> Software Developer
> JetBrains
> http://www.jetbrains.com
> The Drive to Develop
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] buildbot master configs [Re: buildbot deployment: gsutil: Anonymous caller does not have storage.objects.create access to lldb_test_traces]

2018-08-30 Thread Galina Kistanova via lldb-dev
Hi Jan,

The public master uses zorg/buildbot. The config files are here:
https://llvm.org/svn/llvm-project/zorg/trunk/buildbot/osuosl/master/

It might be easier for you to use the silent(staging) master to test your
slaves against. It is there for this exact purpose.
Here is info on how to point your salve to silent master.
http://llvm.org/docs/HowToAddABuilder.html

Thanks

Galina



On Thu, Aug 23, 2018 at 9:56 AM Jan Kratochvil 
wrote:

> Hello,
>
> I need a testing local buildbot instance to develop a buildbot slave
> config:
>
> On Thu, 02 Aug 2018 14:47:42 +0200, Pavel Labath via lldb-dev wrote:
> > On Thu, 2 Aug 2018 at 13:39, Jan Kratochvil 
> wrote:
> > > On Thu, 02 Aug 2018 13:47:25 +0200, Pavel Labath wrote:
> > > > *However*, for setting up a new bot, I'd recommend not using this
> > > > particular slave factory (getLLDBScriptCommandsFactory) at all,
> > > > because it's heavily customized for our use case (*), and very
> > > > different from how typical llvm buildbots are set up. You might be
> > > > better off setting up a new factory, which just does the typical
> > > > checkout+build+(optional) test steps, and avoids all of this mess.
> > >
> > > OK. For development of these new steps I guess I should run my own
> buildbot
> > > master instance? As otherwise that will be probably several/many
> commits to
> > > zorg repo (+requested buildbot master restarts) and I may screw up
> something
> > > along.
> >
> > Yes, that would definitely be the best, but last time I tried that, I
> > couldn't get my master instance to run, for any approximation of the
> > word "run" (which is part of the reason why I haven't done anything
> > about this slave factory, even though I really don't like it)..
>
> I have found buildbot versions different than 0.8.5 are incompatibile with
> LLVM infrastructure/configs so to run 0.8.5 on Fedora 28 x86_64 I have
> backported:
> https://people.redhat.com/jkratoch/buildbot-0.8.5-fix.patch
> https://people.redhat.com/jkratoch/buildbot-0.8.5-fix2.patch
>
> So I downloaded zorg from LLVM and set it up
> [buildbot@host1 ~]$ ls -l lldbmaster
> lrwxrwxrwx 1 buildbot buildbot 32 Aug 14 18:55 lldbmaster ->
> zorg-git/buildbot/osuosl/master/
> [buildbot@host1 ~]$ ls -l lldbmaster/
> total 76
> -rw-r--r-- 1 buildbot buildbot   878 Aug 14 15:25 buildbot.tac
> drwxr-xr-x 2 buildbot buildbot  4096 Aug 14 19:01 config
> -rw-r--r-- 1 buildbot buildbot  9552 Aug 14 15:25 master.cfg
> drwxr-xr-x 2 buildbot buildbot  4096 Aug 14 15:25 public_html
> -rw-r--r-- 1 buildbot buildbot   465 Aug 14 15:25 README.txt
> drwxr-xr-x 2 buildbot buildbot  4096 Aug 14 15:25 templates
> -rw-r--r-- 1 buildbot buildbot 34088 Aug 14 19:01 twistd.log
> -rw--- 1 buildbot buildbot 7 Aug 14 19:01 twistd.pid
> lrwxrwxrwx 1 buildbot buildbot28 Aug 14 19:00 zorg ->
> /home/buildbot/zorg-git/zorg
> with zorg-git directory from https://llvm.org/git/zorg.git patched as
> attached
> but then I still get:
>
>
> --
> $ buildbot start ~/lldbmaster
> Following twistd.log until startup finished..
> /home/buildbot/.local/lib/python2.7/site-packages/buildbot-latest-py2.7.egg/buildbot/schedulers/base.py:111:
> DeprecationWarning: twisted.internet.defer.deferredGenerator was deprecated
> in Twisted 15.0.0; please use twisted.internet.defer.inlineCallbacks instead
>   @defer.deferredGenerator
> ... ^^^ this looks harmless
>
> 2018-08-14 14:35:04+0200 [-] error while parsing config file
> 2018-08-14 14:35:04+0200 [-] Unhandled Error
> Traceback (most recent call last):
>   File
> "/home/buildbot/.local/lib/python2.7/site-packages/buildbot-latest-py2.7.egg/buildbot/master.py",
> line 197, in loadTheConfigFile
> d = self.loadConfig(f)
>   File
> "/home/buildbot/.local/lib/python2.7/site-packages/buildbot-latest-py2.7.egg/buildbot/master.py",
> line 579, in loadConfig
> d.addCallback(do_load)
>   File
> "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 317,
> in addCallback
> callbackKeywords=kw)
>   File
> "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 306,
> in addCallbacks
> self._runCallbacks()
> ---  ---
>   File
> "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 587,
> in _runCallbacks
> current.result = callback(current.result, *args, **kw)
>   File
> "/home/buildbot/.local/lib/python2.7/site-packages/buildbot-latest-py2.7.egg/buildbot/master.py",
> line 226, in do_load
> exec f in localDict
>   File "/quad/home/buildbot/lldbmaster/master.cfg", line 104, in
> 
> standard_categories)
>   File "/quad/home/buildbot/lldbmaster/config/status.py", line 31,
> in get_status_targets
> default_