[PATCH] covoar: Add symbol set reader and ELF data parser to covoar.

Chris Johns chrisj at rtems.org
Sun Apr 29 22:30:16 UTC 2018


On 29/04/2018 20:50, Cillian O'Donnell wrote:
> On 28 April 2018 at 08:08, Chris Johns <chrisj at rtems.org
> <mailto:chrisj at rtems.org>> wrote:
>     +      for (const std::string set : sets) {
>     +        if (verbose)
>     +          std::cerr << " Symbol set: " << set << std::endl;
>     +        const rld::config::section& set_section = config.get_section(set);
>     +        rld::strings libs;
>     +        rld::config::parse_items (set_section, "libraries", libs, true);
>     +        for (std::string lib : libs) {
>     +          lib = rld::find_replace(lib, "@BUILD-TARGET@", buildTarget);
>     +          lib = rld::find_replace(lib, "@BSP@", buildBSP);
> 
> 
> Problem here. It tries to find the find the library but doesn't have the top
> build directory.

Yes, this is correct. I have detected the build path in `main` but I decided to
not use it yet and I have not decided if it gets used at all.

I have not looked at or worked on the qemu side of things, that is next. I am
not sure how this effects things so at this point in time you need to be at the
top of the build tree to work. This is not a bad thing, I think covoar is
leaving temporary files about the place.

>     -  while ((opt = getopt(argc, argv, "1:L:e:c:g:E:f:s:T:O:p:v:d")) != -1) {
>     +  while ((opt = getopt(argc, argv, "1:L:e:c:g:E:f:s:S:T:O:p:vd")) != -1) {
>  
> Missing semicolon between v and d option.

There is no argument to the -v option. With the ':' the option parsing get
stuffed up.

>          switch (opt) {
>     -      case '1': singleExecutable      = optarg; break;
>     -      case 'L': dynamicLibrary        = optarg; break;
>     -      case 'e': executableExtension   = optarg; break;
>     -      case 'c': coverageFileExtension = optarg; break;
>     -      case 'g': gcnosFileName         = optarg; break;
>     -      case 'E': explanations          = optarg; break;
>     -      case 'f': format                = optarg; break;
>     -      case 's': symbolsFile           = optarg; break;
>     -      case 'T': target                = optarg; break;
>     -      case 'O': outputDirectory       = optarg; break;
>     -      case 'v': Verbose               = true;   break;

See here and also `usage(..)`.

Chris


More information about the devel mailing list