xref: /freebsd/contrib/llvm-project/lldb/bindings/interface/SBFileSpecDocstrings.i (revision 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
1*06c3fb27SDimitry Andric %feature("docstring",
2*06c3fb27SDimitry Andric "Represents a file specification that divides the path into a directory and
3*06c3fb27SDimitry Andric basename.  The string values of the paths are put into uniqued string pools
4*06c3fb27SDimitry Andric for fast comparisons and efficient memory usage.
5*06c3fb27SDimitry Andric 
6*06c3fb27SDimitry Andric For example, the following code ::
7*06c3fb27SDimitry Andric 
8*06c3fb27SDimitry Andric         lineEntry = context.GetLineEntry()
9*06c3fb27SDimitry Andric         self.expect(lineEntry.GetFileSpec().GetDirectory(), 'The line entry should have the correct directory',
10*06c3fb27SDimitry Andric                     exe=False,
11*06c3fb27SDimitry Andric             substrs = [self.mydir])
12*06c3fb27SDimitry Andric         self.expect(lineEntry.GetFileSpec().GetFilename(), 'The line entry should have the correct filename',
13*06c3fb27SDimitry Andric                     exe=False,
14*06c3fb27SDimitry Andric             substrs = ['main.c'])
15*06c3fb27SDimitry Andric         self.assertTrue(lineEntry.GetLine() == self.line,
16*06c3fb27SDimitry Andric                         'The line entry's line number should match ')
17*06c3fb27SDimitry Andric 
18*06c3fb27SDimitry Andric gets the line entry from the symbol context when a thread is stopped.
19*06c3fb27SDimitry Andric It gets the file spec corresponding to the line entry and checks that
20*06c3fb27SDimitry Andric the filename and the directory matches what we expect.") lldb::SBFileSpec;
21