jasonmolenda wrote:

> I know this is a simple tool, but it seems like adding a bit of organization 
> could go a long way. Essentially, the tool consists of 3 parts:
> 
> 1. A reader that takes YAML and creates an in-memory/intermediate 
> representation (CoreSpec).
> 2. A writer that takes a CoreSpec and emit a binary.
> 3. The glue that holds (1) and (2) together as well as command-line parsing 
> and I/O.
> 
> If it were up to me, that's how I would structure this tool. I think that 
> will make it a lot easier to understand and extend in the future.

Thanks for all the comments, addressing them now.  

Yeah before I wrote this I didn't have a clear idea of what it would look like 
when finished (for some reason, it seems obvious now, but in the beginning 
there were some poor choices made and fixed along the way).  You could imagine 
someone making an ELF corefile output capability, for instance.  The YAML files 
I'm using as input is just a way of specifying an architecture, some registers 
for threads, and some memory.  

I don't know if I want to structure it more generally yet, with subdirectories, 
or whatever, for the YAML to intermediate representation and for the Mach-O 
corefile writing.  If anyone does want to restructure it for a additional 
input/output methods, I think it will be easy to restructure it at that point.  
It may end up never growing beyond this simple set of features (I know, 
unlikely)

https://github.com/llvm/llvm-project/pull/153911
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to