blob: 0d924a34a653d69e2e8cd1aead528d1f9ca58ef3 [file] [log] [blame]
Chris Lattner30fdc8d2010-06-08 16:52:24 +00001//===-- Section.cpp ---------------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "lldb/Core/Section.h"
11#include "lldb/Core/Module.h"
12#include "lldb/Symbol/ObjectFile.h"
Greg Claytonf5e56de2010-09-14 23:36:40 +000013#include "lldb/Target/Target.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000014
15using namespace lldb;
16using namespace lldb_private;
17
Greg Claytone72dfb32012-02-24 01:59:29 +000018Section::Section (const ModuleSP &module_sp,
19 user_id_t sect_id,
20 const ConstString &name,
21 SectionType sect_type,
22 addr_t file_addr,
23 addr_t byte_size,
Greg Clayton9422dd62013-03-04 21:46:16 +000024 lldb::offset_t file_offset,
25 lldb::offset_t file_size,
Greg Claytone72dfb32012-02-24 01:59:29 +000026 uint32_t flags) :
27 ModuleChild (module_sp),
Chris Lattner30fdc8d2010-06-08 16:52:24 +000028 UserID (sect_id),
29 Flags (flags),
Greg Claytone72dfb32012-02-24 01:59:29 +000030 m_parent_wp (),
Chris Lattner30fdc8d2010-06-08 16:52:24 +000031 m_name (name),
32 m_type (sect_type),
33 m_file_addr (file_addr),
34 m_byte_size (byte_size),
35 m_file_offset (file_offset),
36 m_file_size (file_size),
37 m_children (),
38 m_fake (false),
Greg Clayton741f3f92012-03-27 21:10:07 +000039 m_encrypted (false),
Greg Clayton9422dd62013-03-04 21:46:16 +000040 m_thread_specific (false)
Chris Lattner30fdc8d2010-06-08 16:52:24 +000041{
Daniel Malead01b2952012-11-29 21:49:15 +000042// printf ("Section::Section(%p): module=%p, sect_id = 0x%16.16" PRIx64 ", addr=[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), file [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), flags = 0x%8.8x, name = %s\n",
Greg Claytone72dfb32012-02-24 01:59:29 +000043// this, module_sp.get(), sect_id, file_addr, file_addr + byte_size, file_offset, file_offset + file_size, flags, name.GetCString());
44}
45
46Section::Section (const lldb::SectionSP &parent_section_sp,
47 const ModuleSP &module_sp,
48 user_id_t sect_id,
49 const ConstString &name,
50 SectionType sect_type,
51 addr_t file_addr,
52 addr_t byte_size,
Greg Clayton9422dd62013-03-04 21:46:16 +000053 lldb::offset_t file_offset,
54 lldb::offset_t file_size,
Greg Claytone72dfb32012-02-24 01:59:29 +000055 uint32_t flags) :
56 ModuleChild (module_sp),
57 UserID (sect_id),
58 Flags (flags),
59 m_parent_wp (),
60 m_name (name),
61 m_type (sect_type),
62 m_file_addr (file_addr),
63 m_byte_size (byte_size),
64 m_file_offset (file_offset),
65 m_file_size (file_size),
66 m_children (),
67 m_fake (false),
Greg Clayton741f3f92012-03-27 21:10:07 +000068 m_encrypted (false),
Greg Clayton9422dd62013-03-04 21:46:16 +000069 m_thread_specific (false)
Greg Claytone72dfb32012-02-24 01:59:29 +000070{
Daniel Malead01b2952012-11-29 21:49:15 +000071// printf ("Section::Section(%p): module=%p, sect_id = 0x%16.16" PRIx64 ", addr=[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), file [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), flags = 0x%8.8x, name = %s.%s\n",
Greg Claytone72dfb32012-02-24 01:59:29 +000072// this, module_sp.get(), sect_id, file_addr, file_addr + byte_size, file_offset, file_offset + file_size, flags, parent_section_sp->GetName().GetCString(), name.GetCString());
73 if (parent_section_sp)
74 m_parent_wp = parent_section_sp;
Chris Lattner30fdc8d2010-06-08 16:52:24 +000075}
76
Chris Lattner30fdc8d2010-06-08 16:52:24 +000077Section::~Section()
78{
Greg Claytone72dfb32012-02-24 01:59:29 +000079// printf ("Section::~Section(%p)\n", this);
Chris Lattner30fdc8d2010-06-08 16:52:24 +000080}
81
Chris Lattner30fdc8d2010-06-08 16:52:24 +000082addr_t
83Section::GetFileAddress () const
84{
Greg Claytone72dfb32012-02-24 01:59:29 +000085 SectionSP parent_sp (GetParent ());
86 if (parent_sp)
Chris Lattner30fdc8d2010-06-08 16:52:24 +000087 {
88 // This section has a parent which means m_file_addr is an offset into
89 // the parent section, so the file address for this section is the file
90 // address of the parent plus the offset
Greg Claytone72dfb32012-02-24 01:59:29 +000091 return parent_sp->GetFileAddress() + m_file_addr;
Chris Lattner30fdc8d2010-06-08 16:52:24 +000092 }
93 // This section has no parent, so m_file_addr is the file base address
94 return m_file_addr;
95}
96
Greg Claytone72dfb32012-02-24 01:59:29 +000097lldb::addr_t
98Section::GetOffset () const
99{
100 // This section has a parent which means m_file_addr is an offset.
101 SectionSP parent_sp (GetParent ());
102 if (parent_sp)
103 return m_file_addr;
104
105 // This section has no parent, so there is no offset to be had
106 return 0;
107}
108
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000109addr_t
Greg Claytonf5e56de2010-09-14 23:36:40 +0000110Section::GetLoadBaseAddress (Target *target) const
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000111{
112 addr_t load_base_addr = LLDB_INVALID_ADDRESS;
Greg Clayton9422dd62013-03-04 21:46:16 +0000113 SectionSP parent_sp (GetParent ());
114 if (parent_sp)
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000115 {
Greg Clayton9422dd62013-03-04 21:46:16 +0000116 load_base_addr = parent_sp->GetLoadBaseAddress (target);
Greg Clayton56d9a1b2011-08-22 02:49:39 +0000117 if (load_base_addr != LLDB_INVALID_ADDRESS)
Greg Clayton9422dd62013-03-04 21:46:16 +0000118 load_base_addr += GetOffset();
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000119 }
120 else
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000121 {
Greg Clayton9422dd62013-03-04 21:46:16 +0000122 load_base_addr = target->GetSectionLoadList().GetSectionLoadAddress (const_cast<Section *>(this)->shared_from_this());
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000123 }
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000124 return load_base_addr;
125}
126
127bool
128Section::ResolveContainedAddress (addr_t offset, Address &so_addr) const
129{
Greg Claytonc7bece562013-01-25 18:06:21 +0000130 const size_t num_children = m_children.GetSize();
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000131 if (num_children > 0)
132 {
Greg Claytonc7bece562013-01-25 18:06:21 +0000133 for (size_t i=0; i<num_children; i++)
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000134 {
135 Section* child_section = m_children.GetSectionAtIndex (i).get();
136
137 addr_t child_offset = child_section->GetOffset();
138 if (child_offset <= offset && offset - child_offset < child_section->GetByteSize())
139 return child_section->ResolveContainedAddress (offset - child_offset, so_addr);
140 }
141 }
Greg Clayton9422dd62013-03-04 21:46:16 +0000142 so_addr.SetOffset(offset);
143 so_addr.SetSection(const_cast<Section *>(this)->shared_from_this());
144
Sean Callanan27e02d02012-07-12 20:44:21 +0000145#ifdef LLDB_CONFIGURATION_DEBUG
Greg Clayton9422dd62013-03-04 21:46:16 +0000146 // For debug builds, ensure that there are no orphaned (i.e., moduleless) sections.
147 assert(GetModule().get());
Sean Callanan27e02d02012-07-12 20:44:21 +0000148#endif
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000149 return true;
150}
151
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000152bool
153Section::ContainsFileAddress (addr_t vm_addr) const
154{
155 const addr_t file_addr = GetFileAddress();
156 if (file_addr != LLDB_INVALID_ADDRESS)
157 {
158 if (file_addr <= vm_addr)
159 {
160 const addr_t offset = vm_addr - file_addr;
161 return offset < GetByteSize();
162 }
163 }
164 return false;
165}
166
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000167int
168Section::Compare (const Section& a, const Section& b)
169{
170 if (&a == &b)
171 return 0;
172
Greg Claytone72dfb32012-02-24 01:59:29 +0000173 const ModuleSP a_module_sp = a.GetModule();
174 const ModuleSP b_module_sp = b.GetModule();
175 if (a_module_sp == b_module_sp)
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000176 {
177 user_id_t a_sect_uid = a.GetID();
178 user_id_t b_sect_uid = b.GetID();
179 if (a_sect_uid < b_sect_uid)
180 return -1;
181 if (a_sect_uid > b_sect_uid)
182 return 1;
183 return 0;
184 }
185 else
186 {
187 // The modules are different, just compare the module pointers
Greg Claytone72dfb32012-02-24 01:59:29 +0000188 if (a_module_sp.get() < b_module_sp.get())
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000189 return -1;
190 else
191 return 1; // We already know the modules aren't equal
192 }
193}
194
195
196void
Greg Clayton10177aa2010-12-08 05:08:21 +0000197Section::Dump (Stream *s, Target *target, uint32_t depth) const
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000198{
Greg Clayton89411422010-10-08 00:21:05 +0000199// s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000200 s->Indent();
Daniel Malead01b2952012-11-29 21:49:15 +0000201 s->Printf("0x%8.8" PRIx64 " %-16s ", GetID(), GetSectionTypeAsCString (m_type));
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000202 bool resolved = true;
203 addr_t addr = LLDB_INVALID_ADDRESS;
204
205 if (GetByteSize() == 0)
206 s->Printf("%39s", "");
207 else
208 {
Greg Clayton9422dd62013-03-04 21:46:16 +0000209 if (target)
Greg Claytonf5e56de2010-09-14 23:36:40 +0000210 addr = GetLoadBaseAddress (target);
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000211
212 if (addr == LLDB_INVALID_ADDRESS)
213 {
Greg Claytonf5e56de2010-09-14 23:36:40 +0000214 if (target)
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000215 resolved = false;
216 addr = GetFileAddress();
217 }
218
219 VMRange range(addr, addr + m_byte_size);
220 range.Dump (s, 0);
221 }
222
Daniel Malead01b2952012-11-29 21:49:15 +0000223 s->Printf("%c 0x%8.8" PRIx64 " 0x%8.8" PRIx64 " 0x%8.8x ", resolved ? ' ' : '*', m_file_offset, m_file_size, Get());
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000224
225 DumpName (s);
226
227 s->EOL();
228
Greg Clayton10177aa2010-12-08 05:08:21 +0000229 if (depth > 0)
230 m_children.Dump(s, target, false, depth - 1);
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000231}
232
233void
234Section::DumpName (Stream *s) const
235{
Greg Claytone72dfb32012-02-24 01:59:29 +0000236 SectionSP parent_sp (GetParent ());
237 if (parent_sp)
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000238 {
Greg Claytone72dfb32012-02-24 01:59:29 +0000239 parent_sp->DumpName (s);
240 s->PutChar('.');
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000241 }
242 else
243 {
Greg Claytone72dfb32012-02-24 01:59:29 +0000244 // The top most section prints the module basename
245 ModuleSP module_sp (GetModule());
246 if (module_sp)
247 {
248 const char *module_basename = module_sp->GetFileSpec().GetFilename().AsCString();
249 if (module_basename && module_basename[0])
250 s->Printf("%s.", module_basename);
251 }
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000252 }
253 m_name.Dump(s);
254}
255
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000256bool
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000257Section::IsDescendant (const Section *section)
258{
259 if (this == section)
260 return true;
Greg Claytone72dfb32012-02-24 01:59:29 +0000261 SectionSP parent_sp (GetParent ());
262 if (parent_sp)
263 return parent_sp->IsDescendant (section);
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000264 return false;
265}
266
267bool
268Section::Slide (addr_t slide_amount, bool slide_children)
269{
270 if (m_file_addr != LLDB_INVALID_ADDRESS)
271 {
272 if (slide_amount == 0)
273 return true;
274
275 m_file_addr += slide_amount;
276
277 if (slide_children)
278 m_children.Slide (slide_amount, slide_children);
279
280 return true;
281 }
282 return false;
283}
284
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000285#pragma mark SectionList
286
287SectionList::SectionList () :
288 m_sections()
289{
290}
291
292
293SectionList::~SectionList ()
294{
295}
296
Greg Claytonc7bece562013-01-25 18:06:21 +0000297size_t
Greg Claytone72dfb32012-02-24 01:59:29 +0000298SectionList::AddSection (const lldb::SectionSP& section_sp)
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000299{
Greg Claytone72dfb32012-02-24 01:59:29 +0000300 assert (section_sp.get());
Greg Claytonc7bece562013-01-25 18:06:21 +0000301 size_t section_index = m_sections.size();
Greg Claytone72dfb32012-02-24 01:59:29 +0000302 m_sections.push_back(section_sp);
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000303 return section_index;
304}
305
Greg Claytonc7bece562013-01-25 18:06:21 +0000306size_t
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000307SectionList::FindSectionIndex (const Section* sect)
308{
309 iterator sect_iter;
310 iterator begin = m_sections.begin();
311 iterator end = m_sections.end();
312 for (sect_iter = begin; sect_iter != end; ++sect_iter)
313 {
314 if (sect_iter->get() == sect)
315 {
316 // The secton was already in this section list
317 return std::distance (begin, sect_iter);
318 }
319 }
320 return UINT32_MAX;
321}
322
Greg Claytonc7bece562013-01-25 18:06:21 +0000323size_t
Greg Claytone72dfb32012-02-24 01:59:29 +0000324SectionList::AddUniqueSection (const lldb::SectionSP& sect_sp)
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000325{
Greg Claytonc7bece562013-01-25 18:06:21 +0000326 size_t sect_idx = FindSectionIndex (sect_sp.get());
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000327 if (sect_idx == UINT32_MAX)
328 sect_idx = AddSection (sect_sp);
329 return sect_idx;
330}
331
332
333bool
Greg Claytone72dfb32012-02-24 01:59:29 +0000334SectionList::ReplaceSection (user_id_t sect_id, const lldb::SectionSP& sect_sp, uint32_t depth)
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000335{
336 iterator sect_iter, end = m_sections.end();
337 for (sect_iter = m_sections.begin(); sect_iter != end; ++sect_iter)
338 {
339 if ((*sect_iter)->GetID() == sect_id)
340 {
341 *sect_iter = sect_sp;
342 return true;
343 }
344 else if (depth > 0)
345 {
346 if ((*sect_iter)->GetChildren().ReplaceSection(sect_id, sect_sp, depth - 1))
347 return true;
348 }
349 }
350 return false;
351}
352
353
354size_t
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000355SectionList::GetNumSections (uint32_t depth) const
356{
357 size_t count = m_sections.size();
358 if (depth > 0)
359 {
360 const_iterator sect_iter, end = m_sections.end();
361 for (sect_iter = m_sections.begin(); sect_iter != end; ++sect_iter)
362 {
363 count += (*sect_iter)->GetChildren().GetNumSections(depth - 1);
364 }
365 }
366 return count;
367}
368
369SectionSP
Greg Claytonc7bece562013-01-25 18:06:21 +0000370SectionList::GetSectionAtIndex (size_t idx) const
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000371{
372 SectionSP sect_sp;
373 if (idx < m_sections.size())
374 sect_sp = m_sections[idx];
375 return sect_sp;
376}
377
378SectionSP
379SectionList::FindSectionByName (const ConstString &section_dstr) const
380{
381 SectionSP sect_sp;
382 // Check if we have a valid section string
Greg Claytone72dfb32012-02-24 01:59:29 +0000383 if (section_dstr && !m_sections.empty())
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000384 {
385 const_iterator sect_iter;
386 const_iterator end = m_sections.end();
387 for (sect_iter = m_sections.begin(); sect_iter != end && sect_sp.get() == NULL; ++sect_iter)
388 {
Greg Claytone72dfb32012-02-24 01:59:29 +0000389 Section *child_section = sect_iter->get();
390 assert (child_section);
391 if (child_section->GetName() == section_dstr)
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000392 {
393 sect_sp = *sect_iter;
394 }
395 else
396 {
Greg Claytone72dfb32012-02-24 01:59:29 +0000397 sect_sp = child_section->GetChildren().FindSectionByName(section_dstr);
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000398 }
399 }
400 }
401 return sect_sp;
402}
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000403
404SectionSP
405SectionList::FindSectionByID (user_id_t sect_id) const
406{
407 SectionSP sect_sp;
408 if (sect_id)
409 {
410 const_iterator sect_iter;
411 const_iterator end = m_sections.end();
412 for (sect_iter = m_sections.begin(); sect_iter != end && sect_sp.get() == NULL; ++sect_iter)
413 {
414 if ((*sect_iter)->GetID() == sect_id)
415 {
416 sect_sp = *sect_iter;
417 break;
418 }
419 else
420 {
421 sect_sp = (*sect_iter)->GetChildren().FindSectionByID (sect_id);
422 }
423 }
424 }
425 return sect_sp;
426}
427
Greg Clayton70e33eb2010-07-21 21:49:46 +0000428
429SectionSP
Greg Claytonc7bece562013-01-25 18:06:21 +0000430SectionList::FindSectionByType (SectionType sect_type, bool check_children, size_t start_idx) const
Greg Clayton70e33eb2010-07-21 21:49:46 +0000431{
432 SectionSP sect_sp;
Greg Claytonc7bece562013-01-25 18:06:21 +0000433 size_t num_sections = m_sections.size();
434 for (size_t idx = start_idx; idx < num_sections; ++idx)
Greg Clayton70e33eb2010-07-21 21:49:46 +0000435 {
436 if (m_sections[idx]->GetType() == sect_type)
437 {
438 sect_sp = m_sections[idx];
439 break;
440 }
Greg Clayton4ceb9982010-07-21 22:54:26 +0000441 else if (check_children)
442 {
443 sect_sp = m_sections[idx]->GetChildren().FindSectionByType (sect_type, check_children, 0);
444 if (sect_sp)
445 break;
446 }
Greg Clayton70e33eb2010-07-21 21:49:46 +0000447 }
448 return sect_sp;
449}
450
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000451SectionSP
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000452SectionList::FindSectionContainingFileAddress (addr_t vm_addr, uint32_t depth) const
453{
454 SectionSP sect_sp;
455 const_iterator sect_iter;
456 const_iterator end = m_sections.end();
457 for (sect_iter = m_sections.begin(); sect_iter != end && sect_sp.get() == NULL; ++sect_iter)
458 {
459 Section *sect = sect_iter->get();
460 if (sect->ContainsFileAddress (vm_addr))
461 {
462 // The file address is in this section. We need to make sure one of our child
463 // sections doesn't contain this address as well as obeying the depth limit
464 // that was passed in.
465 if (depth > 0)
466 sect_sp = sect->GetChildren().FindSectionContainingFileAddress(vm_addr, depth - 1);
467
468 if (sect_sp.get() == NULL && !sect->IsFake())
469 sect_sp = *sect_iter;
470 }
471 }
472 return sect_sp;
473}
474
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000475bool
476SectionList::ContainsSection(user_id_t sect_id) const
477{
478 return FindSectionByID (sect_id).get() != NULL;
479}
480
481void
Greg Clayton10177aa2010-12-08 05:08:21 +0000482SectionList::Dump (Stream *s, Target *target, bool show_header, uint32_t depth) const
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000483{
Greg Claytonf6693582010-12-07 18:05:22 +0000484 bool target_has_loaded_sections = target && !target->GetSectionLoadList().IsEmpty();
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000485 if (show_header && !m_sections.empty())
486 {
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000487 s->Indent();
Greg Clayton44435ed2012-01-12 05:25:17 +0000488 s->Printf( "SectID Type %s Address File Off. File Size Flags Section Name\n", target_has_loaded_sections ? "Load" : "File");
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000489 s->Indent();
Greg Clayton44435ed2012-01-12 05:25:17 +0000490 s->PutCString("---------- ---------------- --------------------------------------- ---------- ---------- ---------- ----------------------------\n");
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000491 }
492
493
494 const_iterator sect_iter;
495 const_iterator end = m_sections.end();
496 for (sect_iter = m_sections.begin(); sect_iter != end; ++sect_iter)
497 {
Greg Clayton10177aa2010-12-08 05:08:21 +0000498 (*sect_iter)->Dump(s, target_has_loaded_sections ? target : NULL, depth);
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000499 }
500
501 if (show_header && !m_sections.empty())
502 s->IndentLess();
503
504}
505
506size_t
507SectionList::Slide (addr_t slide_amount, bool slide_children)
508{
509 size_t count = 0;
510 const_iterator pos, end = m_sections.end();
511 for (pos = m_sections.begin(); pos != end; ++pos)
512 {
513 if ((*pos)->Slide(slide_amount, slide_children))
514 ++count;
515 }
516 return count;
517}
518
Sean Callanan56775362012-06-08 02:16:08 +0000519void
520SectionList::Finalize ()
521{
Sean Callanan56775362012-06-08 02:16:08 +0000522 for (const_iterator si = m_sections.begin(), se = m_sections.end();
523 si != se;
524 ++si)
525 {
526 Section *sect = si->get();
527
528 sect->GetChildren().Finalize();
529 }
530}
531