Judges and lawmakers across the country are wrangling over whether and when law enforcement authorities can peer into suspects' cellphones, and the cornucopia of evidence they provide.

A Rhode Island judge threw out cellphone evidence that led to a man being charged with the murder of a 6-year-old boy, saying the police needed a search warrant. A court in Washington compared text messages to voice-mail messages that can be overheard by anyone in a room and are therefore not protected by state privacy laws.

In Louisiana, a federal appeals court is weighing whether location records stored in smartphones deserve privacy protection, or whether they are "business records" that belong to the phone companies.

"The courts are all over the place," said Hanni Fakhoury, a criminal lawyer with the Electronic Frontier Foundation, a civil liberties group. "They can't even agree if there's a reasonable expectation of privacy in text messages that would trigger Fourth Amendment protection."

The issue will attract attention Thursday when a U.S. Senate committee considers limited changes to the Electronic Communications Privacy Act, a 1986 law that regulates how the government can monitor digital communications.

Courts have used it to permit warrantless surveillance of certain kinds of cellphone data. A proposed amendment would require police to obtain a warrant to search an e-mail, no matter how old it is, updating a provision that allows warrantless searches of e-mails more than 180 days old.

As technology races ahead of the law, courts and lawmakers are still trying to figure out how to think about the often intimate data that cellphones contain, said Peter P. Swire, a law professor at Ohio State University. Neither the 1986 law nor the Constitution, he said, could have anticipated how much information cellphones are privy to, including detailed records of people's travels and diagrams of their friends.

"It didn't take into account what the modern cellphone has -- your location, the content of communications that are easily readable, including Facebook posts, chats, texts and all that stuff," Swire said.

Courts also have issued divergent rulings on when and how cellphones can be inspected. An Ohio court ruled that police needed a warrant to search a cellphone because, unlike a piece of paper that might be stuffed inside a suspect's pocket and can be confiscated during an arrest, a cellphone may hold "large amounts of private data."

But California's highest court said the police could look through a cellphone without a warrant so long as the phone was with the suspect at the time of arrest.

Judges have written tomes about whether a cellphone is akin to a "container" -- like a suitcase stuffed with pot that the police might find in a car trunk -- or whether, as the judge in the Rhode Island murder case suggested, it is more comparable to a face-to-face conversation. That judge, Judith C. Savage, described text messages as "raw, unvarnished and immediate, revealing the most intimate of thoughts and emotions." Citizens should expect them to be private, she said.