@@ -188,6 +188,204 @@ def basic_blocks(self, value: '_function.BasicBlockList') -> None:
188188 def inform (self , request : str ) -> bool :
189189 return core .BNAnalysisContextInform (self .handle , request )
190190
191+ def get_setting_bool (self , key : str ) -> bool :
192+ """
193+ Get a boolean setting from the cached settings.
194+
195+ :param key: Setting key
196+ :return: Boolean setting value
197+ """
198+ return core .BNAnalysisContextGetSettingBool (self .handle , key )
199+
200+ def get_setting_double (self , key : str ) -> float :
201+ """
202+ Get a double setting from the cached settings.
203+
204+ :param key: Setting key
205+ :return: Double setting value
206+ """
207+ return core .BNAnalysisContextGetSettingDouble (self .handle , key )
208+
209+ def get_setting_int64 (self , key : str ) -> int :
210+ """
211+ Get a 64-bit signed integer setting from the cached settings.
212+
213+ :param key: Setting key
214+ :return: Int64 setting value
215+ """
216+ return core .BNAnalysisContextGetSettingInt64 (self .handle , key )
217+
218+ def get_setting_uint64 (self , key : str ) -> int :
219+ """
220+ Get a 64-bit unsigned integer setting from the cached settings.
221+
222+ :param key: Setting key
223+ :return: UInt64 setting value
224+ """
225+ return core .BNAnalysisContextGetSettingUInt64 (self .handle , key )
226+
227+ def get_setting_string (self , key : str ) -> str :
228+ """
229+ Get a string setting from the cached settings.
230+
231+ :param key: Setting key
232+ :return: String setting value
233+ """
234+ return core .BNAnalysisContextGetSettingString (self .handle , key )
235+
236+ def get_setting_string_list (self , key : str ) -> List [str ]:
237+ """
238+ Get a string list setting from the cached settings.
239+
240+ :param key: Setting key
241+ :return: List of strings
242+ """
243+ count = ctypes .c_size_t ()
244+ result = core .BNAnalysisContextGetSettingStringList (self .handle , key , ctypes .byref (count ))
245+ out_list = []
246+ for i in range (count .value ):
247+ out_list .append (result [i ].decode ('utf-8' ))
248+ core .BNFreeStringList (result , count .value )
249+ return out_list
250+
251+ def is_valid_offset (self , offset : int ) -> bool :
252+ """
253+ Check if an offset is mapped in the cached memory map.
254+
255+ :param offset: Offset to check
256+ :return: True if offset is mapped
257+ """
258+ return core .BNAnalysisContextIsValidOffset (self .handle , offset )
259+
260+ def is_offset_readable (self , offset : int ) -> bool :
261+ """
262+ Check if an offset is readable in the cached memory map.
263+
264+ :param offset: Offset to check
265+ :return: True if offset is readable
266+ """
267+ return core .BNAnalysisContextIsOffsetReadable (self .handle , offset )
268+
269+ def is_offset_writable (self , offset : int ) -> bool :
270+ """
271+ Check if an offset is writable in the cached memory map.
272+
273+ :param offset: Offset to check
274+ :return: True if offset is writable
275+ """
276+ return core .BNAnalysisContextIsOffsetWritable (self .handle , offset )
277+
278+ def is_offset_executable (self , offset : int ) -> bool :
279+ """
280+ Check if an offset is executable in the cached memory map.
281+
282+ :param offset: Offset to check
283+ :return: True if offset is executable
284+ """
285+ return core .BNAnalysisContextIsOffsetExecutable (self .handle , offset )
286+
287+ def is_offset_backed_by_file (self , offset : int ) -> bool :
288+ """
289+ Check if an offset is backed by the file in the cached memory map.
290+
291+ :param offset: Offset to check
292+ :return: True if offset is backed by file
293+ """
294+ return core .BNAnalysisContextIsOffsetBackedByFile (self .handle , offset )
295+
296+ def get_start (self ) -> int :
297+ """
298+ Get the start address from the cached memory map.
299+
300+ :return: Start address
301+ """
302+ return core .BNAnalysisContextGetStart (self .handle )
303+
304+ def get_end (self ) -> int :
305+ """
306+ Get the end address from the cached memory map.
307+
308+ :return: End address
309+ """
310+ return core .BNAnalysisContextGetEnd (self .handle )
311+
312+ def get_length (self ) -> int :
313+ """
314+ Get the length of the cached memory map.
315+
316+ :return: Length
317+ """
318+ return core .BNAnalysisContextGetLength (self .handle )
319+
320+ def get_next_valid_offset (self , offset : int ) -> int :
321+ """
322+ Get the next valid offset after the given offset from the cached memory map.
323+
324+ :param offset: Starting offset
325+ :return: Next valid offset
326+ """
327+ return core .BNAnalysisContextGetNextValidOffset (self .handle , offset )
328+
329+ def get_next_mapped_address (self , addr : int , flags : int = 0 ) -> int :
330+ """
331+ Get the next mapped address after the given address from the cached memory map.
332+
333+ :param addr: Starting address
334+ :param flags: Optional flags to filter by
335+ :return: Next mapped address
336+ """
337+ return core .BNAnalysisContextGetNextMappedAddress (self .handle , addr , flags )
338+
339+ def get_next_backed_address (self , addr : int , flags : int = 0 ) -> int :
340+ """
341+ Get the next backed address after the given address from the cached memory map.
342+
343+ :param addr: Starting address
344+ :param flags: Optional flags to filter by
345+ :return: Next backed address
346+ """
347+ return core .BNAnalysisContextGetNextBackedAddress (self .handle , addr , flags )
348+
349+ def get_segment_at (self , addr : int ) -> Optional ['binaryview.Segment' ]:
350+ """
351+ Get the segment containing the given address from the cached memory map.
352+
353+ :param addr: Address to query
354+ :return: Segment containing the address, or None
355+ """
356+ segment = core .BNAnalysisContextGetSegmentAt (self .handle , addr )
357+ if not segment :
358+ return None
359+ return binaryview .Segment (segment )
360+
361+ def get_mapped_address_ranges (self ) -> List [tuple ]:
362+ """
363+ Get all mapped address ranges from the cached memory map.
364+
365+ :return: List of (start, end) tuples
366+ """
367+ count = ctypes .c_size_t ()
368+ ranges = core .BNAnalysisContextGetMappedAddressRanges (self .handle , ctypes .byref (count ))
369+ result = []
370+ for i in range (count .value ):
371+ result .append ((ranges [i ].start , ranges [i ].end ))
372+ core .BNFreeAddressRanges (ranges )
373+ return result
374+
375+ def get_backed_address_ranges (self ) -> List [tuple ]:
376+ """
377+ Get all backed address ranges from the cached memory map.
378+
379+ :return: List of (start, end) tuples
380+ """
381+ count = ctypes .c_size_t ()
382+ ranges = core .BNAnalysisContextGetBackedAddressRanges (self .handle , ctypes .byref (count ))
383+ result = []
384+ for i in range (count .value ):
385+ result .append ((ranges [i ].start , ranges [i ].end ))
386+ core .BNFreeAddressRanges (ranges )
387+ return result
388+
191389
192390class Activity (object ):
193391 """
0 commit comments